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>(); }
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>(); }