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