コード例 #1
0
        public static DiskFlyAction GetSSAction(float angle, float power) //Vector3 direction, float angle, float power)
        {
            //初始化物体将要运动的初速度向量
            DiskFlyAction action = CreateInstance <DiskFlyAction>();

            action.start_vector = Quaternion.Euler(new Vector3(0, 0, angle)) * Vector3.right * power;
            return(action);
        }
コード例 #2
0
ファイル: FirstActionManager.cs プロジェクト: core37/unity
 //飞碟飞行
 public void diskFly(GameObject disk, float angle, float power)
 {
     fly = DiskFlyAction.GetSSAction(angle, power); //disk.GetComponent<Disk>().direction, angle, power);
     this.RunAction(disk, fly, this);
 }