|
Architecture,
Design Pattern,
Software Engineering
Flux Architecture in Unity
Working on the post. Full article available soon.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| public class AwesomeGameStore : Store { static private List<INotifyee> Subscribers = new List<INotifyee>(); static private Reducer Reducer; static private State State; static public void Subscribe(INotifyee notifyee) { Subscribers.Add(notifyee); } static public void Dispatch(Action action) { State = Reducer.ProcessAction(State, action); Notify(); } static public State GetState() { return State; } };
|
Comments