Exemple #1
0
 public Player(string name, World world)
     : base(name)
 {
     //The world is always an observer for the player.
     _observerComponent = new ObserverComponent();
     _observerComponent.AddObserver(world.ObserverInstance);
     _observerComponent.AddObserver(UserInterface.Instance.ObserverInstance);
     _state        = new StateComponent <PlayerState>(PlayerState.Idle);
     _observeDelay = 0;
 }
Exemple #2
0
 public void SetWorld(World world)
 {
     _observerComponent = new ObserverComponent();
     _observerComponent.AddObserver(world.ObserverInstance);
     _observerComponent.AddObserver(UserInterface.Instance.ObserverInstance);
 }