private void Start() { shipID = ShipManager.main.AddShip(this); stateMachine = new ShipStateMachine(this); if ((leader == this) || (leader == null)) { stateMachine.ChangeState(new IntercepterStates.IntercepterEmporerState(stateMachine, this, ShipManager.main.emporer)); } else { stateMachine.ChangeState(new IntercepterStates.IntercepterEscortState(stateMachine, this, leader.boid)); boid.GetBehaviour <OffsetPursue> ().RefreshOffset(); } }
private void Start() { shipID = ShipManager.main.AddShip(this); stateMachine = new ShipStateMachine(this); if ((leader == null) && (leader != this)) { stateMachine.ChangeState(new BansheeStates.BansheePatrolState(stateMachine, this, ShipManager.main.emporer)); } else { stateMachine.ChangeState(new BansheeStates.BansheeFollowLeader(stateMachine, this, leader)); boid.GetBehaviour <OffsetPursue> ().RefreshOffset(); } }
//[Header ("Banshee")] //public Ship leader; #endregion #region Mono Methods private void Start() { shipID = ShipManager.main.AddShip(this); stateMachine = new ShipStateMachine(this); OffsetPursue offsetPursue = GetComponent <OffsetPursue> (); if (offsetPursue != null) { offsetPursue.leader = ShipManager.main.emporer.boid; offsetPursue.RefreshOffset(); } stateMachine.ChangeState(new ProtonStates.ProtonPatrolState(stateMachine, this, ShipManager.main.emporer.boid)); }
private void Start() { shipID = ShipManager.main.AddShip(this); stateMachine = new ShipStateMachine(this); stateMachine.ChangeState(new BomberStates.BomberAttackState(stateMachine, this, ShipManager.main.emporer)); }