Beispiel #1
0
 public TankAttackState(TankStateMachine tank)
 {
     _stateMachine = tank;
     _oldPosition  = tank.Tank.transform.position;
     _timer        = 0f;
     _halt         = false;
 }
 public TankChaseState(TankStateMachine tank)
 {
     _stateMachine = tank;
     _oldPosition  = tank.Tank.transform.position;
     _halt         = false;
     _playerPoint  = Vector2.zero;
 }
Beispiel #3
0
 public TankPatrolState(TankStateMachine stateMachine)
 {
     _stateMachine = stateMachine;
     _enemyFound   = false;
     _patrolPoint  = Vector2.zero;
 }
Beispiel #4
0
 void Start()
 {
     _rb2D         = GetComponent <Rigidbody2D>();
     Anim          = GetComponent <Animator>();
     _stateMachine = new TankStateMachine(this);
 }
 public TankAlertState(TankStateMachine stateMachine)
 {
     _stateMachine = stateMachine;
     _cannotGo     = false;
     _timeCounter  = 0f;
 }