Ejemplo n.º 1
0
    /// <summary>
    /// Draws the inputs for username and Score, as well as the Insert LeaderBoard Button
    /// </summary>
    private void DrawInsertBtn()
    {
        GUILayout.BeginVertical(GUILayout.Width(_columnWidth));

        // Draw "USER NAME button
        GUILayout.Label("USER NAME");
        _leaderBoardItem.username = GUILayout.TextField(_leaderBoardItem.username);

        // Draw "SCORE" button
        GUILayout.Label("SCORE");
        _leaderBoardItem.score = int.Parse(GUILayout.TextField(_leaderBoardItem.score.ToString()));

        if (GUILayout.Button("INSERT TO LEADERBOARD"))
        {
            Azure.insert(_leaderBoardItem, () => Debug.Log("inserted" + " " + _leaderBoardItem.username + " " + "to leaderboard"));
        }

        GUILayout.EndVertical();
    }