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); }
/// <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); }
public void SetStartingPlayer(string startingPlayerID) { LogChallengeEventRequest request = new LogChallengeEventRequest(); request.SetChallengeInstanceId(ChallengeID); request.SetEventKey("SetStartingPlayer"); request.SetEventAttribute("StartingPlayer", startingPlayerID); request.Send(OnSetStartingPlayerSuccess, OnSetStartingPlayerError); }
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); }
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); }