コード例 #1
0
ファイル: SplineGroup.cs プロジェクト: dstovell/DogFight
 public static SplineGroup GetNewGroup(ShipLeader ship)
 {
     for (int i = 0; i < SplineGroup.groups.Count; i++)
     {
         return(SplineGroup.groups[i]);
     }
     return(null);
 }
コード例 #2
0
        public void HighlightPath(List <Vector3> path)
        {
            if (this.PathHighlight != null)
            {
                GameObject highlight = GameObject.Instantiate(this.PathHighlight, path[0], Quaternion.identity) as GameObject;
                ShipLeader leader    = highlight.GetComponent <ShipLeader>();
                if (leader == null)
                {
                    leader = highlight.AddComponent <ShipLeader>();
                }

                leader.SetSpeed(500);
                leader.MovePath(path, false);
            }
        }