- 博客(9)
- 收藏
- 关注
转载 AnimatorStateInfo 状态机信息 动画激活 动画结束
动画状态机怎么判断动画是否播完了?AnimatorStateInfo.normalizedTime float normalizedTime; Description: Normalized time of the State. The integer part is the number of time a state has been looped. The f
2015-09-25 12:15:24 4627
原创 3D 主角跟随鼠标转向 主角设置x轴摄像机上也挂一个设置y轴,按下q随机设置天空盒子和光照,主角移动
using UnityEngine;using System.Collections;/// MouseLook rotates the transform based on the mouse delta./// Minimum and Maximum values can be used to constrain the possible rotation///
2015-09-23 18:13:15 1677
原创 通过脚本添加组件 NavMeshAgent寻路动画设置,动画speed设置,随机奔跑寻路,间隔实例化InvokeRepeating ("Run", 0, i)
using UnityEngine;using System.Collections;//通过脚本添加组件 这样会给动画师方便[RequireComponent(typeof(Animator))][RequireComponent(typeof(NavMeshAgent))]public class tianjiazhujian : MonoBehaviour {
2015-09-21 12:33:49 3013
原创 Toggle开关
using UnityEngine;using System.Collections;using UnityEngine.UI;public class MyToggle : MonoBehaviour{ public GameObject isOnGameObject; public GameObject isOffGameObject;
2015-09-16 13:41:35 1753
原创 滑动翻页的实现5.1 拖拽结束接口
using UnityEngine;using System.Collections;using UnityEngine.EventSystems;using UnityEngine.UI;//添加了两个拖拽开始拖拽结束接口,对滑动进行检测public class LevelButtonScrollRect : MonoBehaviou,IBeginDragHandler,
2015-09-15 09:05:47 850
原创 技能冷却UGUI5.1
using UnityEngine;using System.Collections;using UnityEngine.UI;public class SkillItem : MonoBehaviour{ public float coldTime = 2; public KeyCode keycode; private float time
2015-09-14 10:09:06 680
原创 鼠标样式改变 隐藏鼠标在鼠标位置绘制图片,当鼠标经过时改变样式
//隐藏鼠标图标//Screen.showCursor=false;void OnGUI(){//Vector2 mouse_pos=Input.mousePosition;//GUI.DrawTexture( new Rect(mouse_pos.x,Screen.height-mouse_pos.y,26,30),mouse_pic);—————————————
2015-09-02 12:13:54 1061
原创 雨谈老师塔防摄像头移动归位 围绕选定对象旋转
using UnityEngine;using System.Collections;public class CameraContorl : MonoBehaviour {public float minFov=15.0f;public float maxFov=150.0f;public float sensitivity = 10f;private Trans
2015-09-01 14:52:06 540
原创 雨谈老师塔防Editor 路点
Edetor详细解释Editor文件夹可以在根目录下,也可以在子目录里,只要名子叫Editor就可以。比如目录:/xxx/xxx/Editor 和 /Editor 是一样的,无论多少个叫Editor的文件夹都可以。Editor下面放的所有资源文件或者脚本文件都不会被打进发布包中,并且脚本也只能在编辑时使用。一般呢会把一些工具类的脚本放在这里,或者是一些编辑时用的DLL。 比如我们现在
2015-09-01 14:28:24 417
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人