Esempio n. 1
0
    void Update()
    {
        if (_showImageFade)
        {
            _showImageCanvasGroup.alpha = Mathf.MoveTowards(_showImageCanvasGroup.alpha, _targetAlpha, imageFadeSpeed * Time.deltaTime);
            if (_showImageCanvasGroup.alpha == _targetAlpha)
            {
                _showImageFade = false;
            }
        }

        if (_waitInput)
        {
            ControlWindowItem controlWindow = FindObjectOfType(typeof(ControlWindowItem)) as ControlWindowItem;
            if (controlWindow != null)
            {
                InputField input = controlWindow.GetComponentInChildren <InputField>();
                if (input != null)
                {
                    string blockName = (int)LevelMgr.instance.curLevel + "-" + input.text;
                    if (_flowchart.HasBlock(blockName))
                    {
                        _flowchart.ExecuteBlock(blockName);
                        input.text = "";
                        controlWindow.Hide();
                        _waitInput = false;
                    }
                }
            }
        }
    }
Esempio n. 2
0
    public void HideControlWindow()
    {
        ControlWindowItem controlWindow = FindObjectOfType(typeof(ControlWindowItem)) as ControlWindowItem;

        if (controlWindow != null)
        {
            controlWindow.Hide();
        }
    }