Exemplo n.º 1
0
    public void NotifyGameOver(string id)
    {
        PlayerIdStruct message = new PlayerIdStruct(id);

        io.Emit("gameOver", JsonUtility.ToJson(message));
        GameManager.instance.OnGameOver(id);
    }
Exemplo n.º 2
0
    void HandleGameOver(SocketIOEvent e)
    {
        Debug.Log("handleGameOver");
        Debug.Log(e.data);
        PlayerIdStruct message = JsonUtility.FromJson <PlayerIdStruct>(e.data);

        GameManager.instance.OnGameOver(message.id);
    }
Exemplo n.º 3
0
    public void NotifyPlayerDefeated(string id)
    {
        PlayerIdStruct message = new PlayerIdStruct(id);

        io.Emit("playerDefeated", JsonUtility.ToJson(message));
    }
Exemplo n.º 4
0
    public void NotifyPlayerReady(string id)
    {
        PlayerIdStruct message = new PlayerIdStruct(id);

        io.Emit("playerready", JsonUtility.ToJson(message));
    }