예제 #1
0
    public override void Reduce(Event evt, ModelTable table)
    {
        Type type = evt.GetType();

        if (type == typeof(NewGameBegun))
        {
            NewGameBegun gameBegun = (NewGameBegun)evt;
            table.InsertModel(gameBegun.playerId, new PlayerReadModel(gameBegun.playerId, gameBegun.playerName));
            return;
        }
    }
예제 #2
0
 private void OnNewGameBegun(NewGameBegun evt)
 {
     this.id = evt.playerId;
 }