예제 #1
0
        public void Move(int x, int y)
        {
            LogChallengeEventRequest request = new LogChallengeEventRequest();

            request.SetChallengeInstanceId(challengeID);
            request.SetEventKey("Move");
            request.SetEventAttribute("X", x);
            request.SetEventAttribute("Y", y);
            request.Send(OnMoveSuccess, OnMoveError);
        }
예제 #2
0
    /// <summary>
    /// Sends the move event to the server
    /// </summary>
    /// <param name="x"></param>
    /// <param name="y"></param>
    public void Move(int x, int y)
    {
        LogChallengeEventRequest request = new LogChallengeEventRequest();

        request.SetChallengeInstanceId(_challengeId);
        request.SetEventKey("Move");
        request.SetEventAttribute("X", x);
        request.SetEventAttribute("Y", y);
        request.SetEventAttribute("LastPlayerId", UIManager.Instance.LocalPlayerId);
        request.Send(OnMoveSuccess, OnMoveError);
    }
예제 #3
0
    public void SetStartingPlayer(string startingPlayerID)
    {
        LogChallengeEventRequest request = new LogChallengeEventRequest();

        request.SetChallengeInstanceId(ChallengeID);
        request.SetEventKey("SetStartingPlayer");
        request.SetEventAttribute("StartingPlayer", startingPlayerID);
        request.Send(OnSetStartingPlayerSuccess, OnSetStartingPlayerError);
    }
예제 #4
0
    public void Move(string action)
    {
        Debug.Log("Sending move to GS");
        LogChallengeEventRequest request = new LogChallengeEventRequest();

        request.SetChallengeInstanceId(ChallengeID);
        request.SetEventKey("Move");
        request.SetEventAttribute("Action", action);
        request.Send(OnMoveSuccess, OnMoveError);
    }
예제 #5
0
    public void ChallengeGameLost()
    {
        Debug.Log("Challenge Game Lost");
        LogChallengeEventRequest request = new LogChallengeEventRequest();

        request.SetChallengeInstanceId(ChallengeID);
        request.SetEventKey("GameLost");
        request.SetEventAttribute("playerID", gameSparksUserIDScript.myUserID);
        request.Send(OnChallengeGameLostSuccess, OnChallengeGameLostError);
    }