예제 #1
0
 public DyingState(EnemyController enemy, EnemyStateMachine fsm) : base(enemy, fsm)
 {
     animator = enemy.GetComponent <Animator>();
     rb       = enemy.GetComponent <Rigidbody2D>();
     slider   = enemy.transform.Find("Canvas").Find("Healthbar").GetComponent <Slider>();
 }
예제 #2
0
 public WalkingState(EnemyController enemy, EnemyStateMachine fsm) : base(enemy, fsm)
 {
     rb     = enemy.GetComponent <Rigidbody2D>();
     speed  = enemy.speed;
     slider = enemy.transform.Find("Canvas").Find("Healthbar").GetComponent <Slider>();
 }