主要讲的是界面的具体分布以及一些工具的运用。
scens:游戏资源
assets:场景、模板、脚本啥的
library:库
log:日志
package: 资源包
projectseting:工程相关的设置
主要讲的是界面的具体分布以及一些工具的运用。
scens:游戏资源
assets:场景、模板、脚本啥的
library:库
log:日志
package: 资源包
projectseting:工程相关的设置
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Player : MonoBehaviour //private:私有的属性 { public Rigidbody rd;//定义一个组件的属性 // Start is called before the first frame update void Start() { //Debug.Log("游戏开始了"); rd = GetComponent() ;//得到刚体组件,每个方法后面要加(); } // Update is called once per frame void Update() { //Debug.Log("正在游戏中"); //rd.AddForce(Vector3.right); //AddForce:添加一个力,Vector3.right:3d游戏向右的方向 //rd.AddForce(new Vector3(2, 0, 0)); //第二种方法 float h = Input.GetAxis("Horizontal"); // GetAxis:得到一个轴 Horizontal:水平的轴 //-1 1 float v = Input.GetAxis("Vertical"); //w s float j = Input.GetAxis("Jump"); Debug.Log(h); rd.AddForce(new Vector3(h, j, v)*2); } }
F键 控制物体视角
rd.AddForce(vector3.forward);
input.getaxis(“horizontal”);
input.getaxis("vertical");
debug.log();
r
Assets--是我们的资源,在开发游戏的 过程中 场景+脚本+模型+素材
Library-是库,表示的是系统的一些库
logs是日志
https://space.bilibili.com/97249155
X
1.代码2.拖拽
文件名和类名一致
引用系统类,using
显示再控制台上
日志(调bug)
控制台可以直接打开windows-general常规-consolu
正常信息,警告,错误
edit, preferences, external tools(更改脚本的编写工具)
sharder相当于一门语言
pivot 模型中心
center 碰撞中心
步移只有在global状态下可以使用
ctrl步移大小为0.25
assets 资源
library 库
添加是已有的项目
新建是新制造项目
世界坐标系与局部坐标系
center:中心,把物体及子物体当成整体来计算
Debug.Log();//输出日志