Example #1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            UnetGameplayServer t = (UnetGameplayServer)target;

            GUI.enabled = Application.isPlaying && !t.gameStarted;
            if (GUILayout.Button("Start Game"))
            {
                t.StartGame();
            }

            GUI.enabled = Application.isPlaying && t.gameStarted;
            if (GUILayout.Button("Publish Round"))
            {
                t.PublishRound();
            }

            GUI.enabled = false;
            UnityEditor.EditorGUILayout.IntField("Current Rount", t.currentRound);
            UnityEditor.EditorGUILayout.IntField("Player Count", t.playerCount);

            UnityEditor.EditorGUILayout.IntSlider("Posted Player Moves", t.PostedPlayerMoves, 0, t.playerCount);
        }
Example #2
0
 protected void Awake()
 {
     Instance = this;
 }