public void SetSplineGroup(SplineGroup splineGroup) { if (this.Leader != null) { this.Leader.SetSplineGroup(splineGroup); } }
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); }
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); }
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); }
public void SetSplineGroup(SplineGroup group) { this.splineGroup = group; this.spline = group.GetClosestSpline(this.transform.position); //Debug.LogError("SetSplineGroup " + this.name + " spline=" + spline); }