protected override void ChangeState(Dog dog, ActionDogType actionDogType) { switch (actionDogType) { case ActionDogType.Call: { dog.DogState = new NeutralDogState(); break; } case ActionDogType.Scare: { dog.DogState = new OffendDogState(); break; } } }
protected override void ChangeState(Dog dog, ActionDogType actionDogType) { switch (actionDogType) { case ActionDogType.Call: { dog.DogState = new JoyDogState(); break; } case ActionDogType.Scare: { dog.DogState = new SadnessDogState(); break; } } }
internal virtual void ActionDog(Dog dog, ActionDogType actionDogType) { ChangeState(dog, actionDogType); }
protected abstract void ChangeState(Dog dog, ActionDogType actionDogType);
public void Hear(ActionDogType actionDogType) { DogState.ActionDog(this, actionDogType); }