摘要:
http://robertpenner.com/easing/easing_demo.html 转载而来 阅读全文
摘要:
先定义一个委托,然后定义一个委托类型的事件,最后向该事件中注册有委托格式的方法。eg:1.先定义委托 public delegate void ButtonUpHandler(string buttonName);//参数类型为string,返回值为Void2.定义委托类型的事件public sta... 阅读全文
摘要:
广播 在一个Cubes上挂载inttro_BoradCastMessate脚本public class Inttro_BroadCastMessate : MonoBehaviour { // Use this for initialization void Start () { ... 阅读全文
摘要:
Mathf.Lerp(float a,float b,float c);//以c 的速度从a变换到bVector3.Lerp(Vector3 a,vector3 b,float c)//以c 的速度从A 变换到B 阅读全文
摘要:
获取游戏对象有三种方法:1.通过对象名称获取:objCube=GameObject.Find("Cube");例如:private var objCube:GameObject;private var isCubeRoate=false;function Start () { objCube=Gam... 阅读全文
摘要:
using UnityEngine;using System.Collections;public class Bullet : MonoBehaviour { public float speed=2f; // Use this for initialization void Start () {... 阅读全文
摘要:
public class Gun : MonoBehaviour { public float rate=0.2f; public GameObject bullet; // Use this for initialization void Start () { openFire (); } /... 阅读全文