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();
            }
        }
Ejemplo n.º 2
0
        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();
            }
        }
Ejemplo n.º 3
0
        //[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));
        }
Ejemplo n.º 4
0
 private void Start()
 {
     shipID       = ShipManager.main.AddShip(this);
     stateMachine = new ShipStateMachine(this);
     stateMachine.ChangeState(new BomberStates.BomberAttackState(stateMachine, this, ShipManager.main.emporer));
 }