摘要: http://robertpenner.com/easing/easing_demo.html 转载而来 阅读全文
posted @ 2015-12-29 18:24 Kim-teng 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 先定义一个委托,然后定义一个委托类型的事件,最后向该事件中注册有委托格式的方法。eg:1.先定义委托 public delegate void ButtonUpHandler(string buttonName);//参数类型为string,返回值为Void2.定义委托类型的事件public sta... 阅读全文
posted @ 2015-06-27 10:55 Kim-teng 阅读(1039) 评论(0) 推荐(0) 编辑
摘要: 广播 在一个Cubes上挂载inttro_BoradCastMessate脚本public class Inttro_BroadCastMessate : MonoBehaviour { // Use this for initialization void Start () { ... 阅读全文
posted @ 2015-06-02 20:00 Kim-teng 阅读(1415) 评论(0) 推荐(0) 编辑
摘要: Mathf.Lerp(float a,float b,float c);//以c 的速度从a变换到bVector3.Lerp(Vector3 a,vector3 b,float c)//以c 的速度从A 变换到B 阅读全文
posted @ 2015-05-31 22:28 Kim-teng 阅读(734) 评论(0) 推荐(0) 编辑
摘要: 获取游戏对象有三种方法:1.通过对象名称获取:objCube=GameObject.Find("Cube");例如:private var objCube:GameObject;private var isCubeRoate=false;function Start () { objCube=Gam... 阅读全文
posted @ 2015-05-31 20:26 Kim-teng 阅读(2223) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections;public class Bullet : MonoBehaviour { public float speed=2f; // Use this for initialization void Start () {... 阅读全文
posted @ 2015-04-27 19:42 Kim-teng 阅读(340) 评论(0) 推荐(0) 编辑
摘要: public class Gun : MonoBehaviour { public float rate=0.2f; public GameObject bullet; // Use this for initialization void Start () { openFire (); } /... 阅读全文
posted @ 2015-04-27 19:38 Kim-teng 阅读(1276) 评论(0) 推荐(0) 编辑