コード例 #1
0
 public void SetSandboxButtonState(LevelModeButtonState state)
 {
     if (state == LevelModeButtonState.Default)
     {
         SandboxButton.GetComponent <LevelModeButton>().SetButtonDefault();
     }
     else if (state == LevelModeButtonState.Active)
     {
         SandboxButton.GetComponent <LevelModeButton>().SetButtonActive();
     }
     else if (state == LevelModeButtonState.Completed)
     {
         SandboxButton.GetComponent <LevelModeButton>().SetButtonCompleted();
     }
     else if (state == LevelModeButtonState.Failed)
     {
         SandboxButton.GetComponent <LevelModeButton>().SetButtonFailed();
     }
 }
コード例 #2
0
        public void SetCurrentCaseButtonState(LevelModeButtonState state)
        {
            var caseNumber = Main.Instance.CaseHandler.CurrentCase;

            if (state == LevelModeButtonState.Default)
            {
                CaseButtons[caseNumber].GetComponent <LevelModeButton>().SetButtonDefault();
            }
            else if (state == LevelModeButtonState.Active)
            {
                CaseButtons[caseNumber].GetComponent <LevelModeButton>().SetButtonActive();
            }
            else if (state == LevelModeButtonState.Completed)
            {
                CaseButtons[caseNumber].GetComponent <LevelModeButton>().SetButtonCompleted();
            }
            else if (state == LevelModeButtonState.Failed)
            {
                CaseButtons[caseNumber].GetComponent <LevelModeButton>().SetButtonFailed();
            }
        }