コード例 #1
0
 public Coroutine Show()
 {
     gameObject.SetActive(true);
     continueButton.ResetFill();
     quitButton.ResetFill();
     continueButton.Deselect();
     quitButton.Deselect();
     fadeDone    = false;
     scanButtons = false;
     return(StartCoroutine(ShowSequence()));
 }
コード例 #2
0
    protected virtual void Update()
    {
        var hit = AbstractMainMenu.Instance.CurrentUIHit();

        if (hit)
        {
            var heartButton = hit.GetComponentInParent <HeartButton>();
            if (heartButton)
            {
                if (heartButton != currentHeartButton)
                {
                    if (currentHeartButton)
                    {
                        currentHeartButton.Deselect();
                    }

                    currentHeartButton = heartButton;
                    AbstractMainMenu.Instance.uiHeart.Reposition(currentHeartButton.Select());
                }

                if (Input.GetMouseButtonDown(0))
                {
                    heartButton.Click();
                }
            }
            else if (currentHeartButton && hit != separatorGameObject)
            {
                currentHeartButton.Deselect();
                AbstractMainMenu.Instance.uiHeart.Reposition(defaultHeartLocation);
                currentHeartButton = null;
            }
        }
        else if (currentHeartButton)
        {
            currentHeartButton.Deselect();
            AbstractMainMenu.Instance.uiHeart.Reposition(defaultHeartLocation);
            currentHeartButton = null;
        }
    }