コード例 #1
0
ファイル: VoxelPlayUI.cs プロジェクト: jisuhyun/mobileTest
        bool ProcessConsoleCommand(string command)
        {
            string upperCommand = command.ToUpper();

            if (upperCommand.IndexOf("/CLEAR") >= 0)
            {
                sb.Length        = 0;
                consoleText.text = "";
                return(true);
            }
            else if (upperCommand.IndexOf("/KEYS") >= 0)
            {
                PrintKeySheet();
                return(true);
            }
            else if (upperCommand.IndexOf("/HELP") >= 0)
            {
                PrintCommands();
                return(true);
            }
            else if (upperCommand.IndexOf("/INVOKE") >= 0)
            {
                ProcessInvokeCommand(command);
                return(true);
            }
            else if (upperCommand.IndexOf("/LOAD") >= 0)
            {
                ProcessLoadCommand(command);
                return(true);
            }
            else if (upperCommand.IndexOf("/SAVE") >= 0)
            {
                ProcessSaveCommand(command);
                return(true);
            }
            else if (upperCommand.IndexOf("/BUILD") >= 0)
            {
                ToggleConsoleVisibility(false);
                env.SetBuildMode(!env.buildMode);
                return(true);
            }
            else if (upperCommand.IndexOf("/TELEPORT") >= 0)
            {
                ToggleConsoleVisibility(false);
                ProcessTeleportCommand(command);
                return(true);
            }
            else if (upperCommand.IndexOf("/INVENTORY") >= 0)
            {
                ProcessInventoryResizeCommand(command);
                return(true);
            }
            else if (upperCommand.IndexOf("/VIEWDISTANCE") >= 0)
            {
                ProcessViewDistanceCommand(command);
                return(true);
            }
            else if (upperCommand.IndexOf("/DEBUG") >= 0)
            {
                ToggleDebugWindow(!debug.activeSelf);
                return(true);
            }
            else if (upperCommand.IndexOf("/FLOOD") >= 0)
            {
                ProcessFloodCommand(command);
                return(true);
            }
            else if (upperCommand.IndexOf("/STUCK") >= 0)
            {
                if (VoxelPlayFirstPersonController.instance != null)
                {
                    VoxelPlayFirstPersonController.instance.Unstuck(true);
                }
                return(true);
            }
            return(false);
        }