public Monster(MonsterState state, int i, int randomMonsterType, MovementStrategy[] movementStrategies) { this.TransitionTo(state); this.MonsterIndex = i; this.CurrentHealth = 100; this.Loot = 5; this.Position = i * 2 - 20; this.MonsterType = randomMonsterType; this.MovementMethod = movementStrategies[randomMonsterType - 1]; }
public void TransitionTo(MonsterState state) { this.currentState = state; this.currentState.SetMonsterState(this); }