예제 #1
0
        //------------------------------------------------------------
        //  MessageBox_OnClick
        //  Called when the message box detects an on click event

        private void MessageBox_OnClick(MessageBox sender)
        {
            //  Increment index
            _introductionIndex++;

            //  Check if index exists
            if (_introductionIndex < _introductionLines.Count)
            {
                _messageBox.ChangeText(_introductionLines[_introductionIndex]);
            }


            //  Check for trigger switch

            switch (_introductionIndex)
            {
            case 3:
                _helperLabel.UpdateText("Click player circle and move mouse around");
                _introductionTrigger = IntroductionTriggers.ClickPlayer;
                break;

            case 4:
                _helperLabel.UpdateText("Consume to other circle by running into it");
                _introductionActor   = SpawnIntroductionEnemey();
                _introductionTrigger = IntroductionTriggers.ConsumeFood;
                break;

            case 8:
                _helperLabel.UpdateText("Use left and right click to change colors");
                _colorSwitchCount    = 0;
                _introductionTrigger = IntroductionTriggers.ColorSwitch;
                break;

            case 11:
                CreateWithoutIntroduction();
                break;

            default:
                _helperLabel.UpdateText("");
                break;
            }
        }