public void movePlayer(int result) { if (whosTurn == GameStates.MatchState.matchIndex) { NewPos npos = new NewPos() { diceResult = result, newPos = 8 }; NetworkClient.instance.Emit("updatePosition", new JSONObject(JsonUtility.ToJson(npos))); } diceResult = result; Debug.Log("Dice Result " + diceResult); pathControls[whosTurn - 1].moveForwardCount = diceResult; pathControls[whosTurn - 1].moveAllowed = true; }
/// <summary> /// Called when [new position]. /// </summary> /// <param name="e">The e.</param> protected virtual void OnNewPos(Position e) { NewPos?.Invoke(this, e); }