Example #1
0
 /// <summary>
 /// Adds a new action to the <see cref="GameSyncManager{T}"/>, applies it to the <typeparamref name="T"/> state, and adds it to the <see cref="NewActions"/> collection.
 /// </summary>
 /// <param name="newAction">The new <see cref="IGameAction{T}"/> to apply.</param>
 public void AddAction(IGameAction <T> newAction)
 {
     NewActionsList.Add(newAction);
     if (newAction.CanUpdate(GameState))
     {
         newAction.Update(GameState);
     }
 }
Example #2
0
 public void Update()
 {
     _current?.Update();
 }