Ejemplo n.º 1
0
    public async Task Publish_Moved(Token token, Space from, Space to)
    {
        var args = new TokenMovedArgs {
            Token       = token,
            RemovedFrom = from,
            AddedTo     = to,
            Count       = 1,
            GameState   = this.gameStateForEventArgs
        };

        await TokenMoved.InvokeAsync(args);

        // Also trigger the Added & Removed events
        await TokenAdded.InvokeAsync(args);

        await TokenRemoved.InvokeAsync(args);
    }
Ejemplo n.º 2
0
 public Task Publish_Added(Space space, Token token, int count, AddReason reason)
 {
     return(TokenAdded.InvokeAsync(new TokenAddedArgs(space, token, reason, count, gameStateForEventArgs)));
 }