public State(
     IObservableStateProperty <int> stars,
     IObservableStateProperty <int> coins)
 {
     Stars = stars;
     Coins = coins;
 }
 public void RemoveProperty(IObservableStateProperty property)
 {
     if (!_properties.Contains(property))
     {
         throw new Exception("Tried to remove an unknown property from the broker");
     }
     _properties.Remove(property);
 }
 public void AddProperty(IObservableStateProperty property)
 {
     if (_properties.Contains(property))
     {
         throw new Exception("Tried to add the same property to the broker twice");
     }
     _properties.Add(property);
 }
Example #4
0
 public void Initialise(
     IStatePropertyBroker stateBroker)
 {
     GameplayState = new ObservableStateProperty <GameplayStates>(stateBroker, GameplayStates.Starting);
 }
Example #5
0
 public void SetChanged(IObservableStateProperty property)
 {
     _stateBroker.SetChanged(property);
 }
Example #6
0
 public void Initialise(
     IStatePropertyBroker stateBroker)
 {
     CurrentScene = new ObservableStateProperty <ISceneReference>(stateBroker, null);
     LoadingState = new ObservableStateProperty <LoadingStates>(stateBroker, LoadingStates.Idle);
 }
Example #7
0
 public ActorStates(
     IStatePropertyBroker stateBroker)
 {
     MovingState = new ObservableStateProperty <MovingStates>(stateBroker, MovingStates.Idle);
 }