예제 #1
0
 public void SetSplineGroup(SplineGroup splineGroup)
 {
     if (this.Leader != null)
     {
         this.Leader.SetSplineGroup(splineGroup);
     }
 }
예제 #2
0
파일: Team.cs 프로젝트: dstovell/DogFight
        public SplineGroup AssignSplineGroup(ShipController ship)
        {
            SplineGroup splineGroup = SplineGroup.GetNewGroup(ship.Leader);

            //Debug.LogError("AssignSplineGroup " + ship.Leader.name + " splineGroup=" + splineGroup);

            ship.Leader.SetSplineGroup(splineGroup);
            ship.Warp(ship.transform);

            return(splineGroup);
        }
예제 #3
0
 protected override bool OnConditionsMet(GameObject triggerer)
 {
     for (int i = 0; i < this.Ships.Length; i++)
     {
         ShipController ship = this.Ships[i];
         if ((ship != null) && (ship.gameObject == triggerer))
         {
             SplineGroup currentGroup = ship.GetSplineGroup();
             if ((this.From == null) || (currentGroup == null) || (this.From == currentGroup))
             {
                 if (currentGroup != this.To)
                 {
                     ship.SetSplineGroup(this.To);
                     return(true);
                 }
             }
         }
     }
     return(false);
 }
예제 #4
0
        private IEnumerator EnableForBattleIn(float secs)
        {
            EjectLeader();
            this.moveMode = MoveMode.SplineNav;

            SplineGroup splineGroup = SplineGroup.GetNewGroup(this.Leader);

            this.SetSplineGroup(splineGroup);

            if (secs > 0f)
            {
                yield return(new WaitForSeconds(secs));
            }

            if (this.Pilot == PilotType.Human)
            {
                SetupCamera();
                SetupHUD();
            }

            this.LoadWeapon(this.PrimaryWeapon);
        }
예제 #5
0
 public void SetSplineGroup(SplineGroup group)
 {
     this.splineGroup = group;
     this.spline      = group.GetClosestSpline(this.transform.position);
     //Debug.LogError("SetSplineGroup " + this.name + " spline=" + spline);
 }