- 博客(5)
- 收藏
- 关注
原创 Unity API常用方法和类(四)
一. Camera【1】组件介绍Clipping Planes:Camera最近最远视野Field of View:视角的宽阔程度Projection:视野类型Clear Flags:设置背景的,默认为Skybox .选择到Solid Color时,下面的Background可设置背景颜色Field of View为48时Field of View为100时【2】静态变量mai...
2020-03-01 14:18:26 195
原创 Unity API常用方法和类(三)
一.射线检测【1】Raycast(1)基本方法检测物体player前方是否有物体void Update () { Ray ray = new Ray(transform.position+transform.forward, transform.forward); bool isCollider = Physics.Raycast(ray); Debug.Log(...
2020-03-01 14:10:46 272
原创 Unity API常用方法和类(二)
一. Input类【1】Input的一些静态方法(静态函数)(1).GetKeyXXX的使用(检测键盘按键)void Update(){ if (Input.GetKeyDown(KeyCode.Space)) { print("KeyDown"); //按下空格时,返回值为KeyDown } if (Input.GetKeyUp(K...
2020-03-01 14:09:18 375
原创 Unity API常用方法和类(一)
1.事件函数unity提供的事件方法及作用2.Time类运行测试:void Start () {Debug.Log(“Time.deltaTime:” + Time.deltaTime);Debug.Log(“Time.fixedDeltaTime:” + Time.fixedDeltaTime);Debug.Log(“Time.fixedTime:” + Time.fixedTi...
2020-03-01 14:06:31 330
原创 打地鼠的游戏
一. 创建场景更改摄影机类型。点击camera面板,更改projection素材箱内新建一个文件夹 改名为Sprites导入图片素材到Sprites文件夹中选中素材分别在对应面板更改texture type为2D 然后apply将图片ground拖入场景中,根据图片的分辨率如下图:在game面板下的free aspect下添加跟上图一致的分辨率,标签命名为dadishu...
2020-02-19 21:00:20 364
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人