示例#1
0
 // Debug function
 void OnGUI()
 {
     if (debugMenuIsOpen.GetDown())
     {
         /*const float height = 100;
          *
          * GUILayout.BeginArea(new Rect(30, Screen.height - height, 200, height));
          *
          * GUILayout.BeginVertical("box");
          * GUILayout.Label("Press F12 to close");
          *
          * bool meleeAttackEnabled = GUILayout.Toggle(MeleeAttack.Enabled, "Enable Melee Attack");
          * bool rangeAttackEnabled = GUILayout.Toggle(RangedAttack.Enabled, "Enable Range Attack");
          *
          * if (meleeAttackEnabled != MeleeAttack.Enabled)
          * {
          *  if (meleeAttackEnabled)
          *      MeleeAttack.Enable();
          *  else
          *      MeleeAttack.Disable();
          * }
          *
          * if (rangeAttackEnabled != RangedAttack.Enabled)
          * {
          *  if (rangeAttackEnabled)
          *      RangedAttack.Enable();
          *  else
          *      RangedAttack.Disable();
          * }
          * GUILayout.EndVertical();
          * GUILayout.EndArea();*/
     }
 }