Пример #1
0
        void OnTriggerStay2D(Collider2D collision)
        {
            ITrigger trigger = collision.GetComponent <ITrigger>();

            if (trigger != null)
            {
                if (haveArms)
                {
                    if (Input.GetKeyDown(KeyCode.Space))
                    {
                        trigger.execute();
                    }
                }
                else
                {
                    hud.setMessage("i have no arms!");
                }
            }
        }
Пример #2
0
        void Start()
        {
            hud.setFinal("");
            hud.setMessage("i can't do nothing!", 2f);
            isAlive = true;
            wins    = false;


            haveLeftEye  = false;
            haveRightEye = false;
            haveBoots    = false;

            eyeLeft.enabled    = false;
            eyeRight.enabled   = false;
            eyeBoth.enabled    = false;
            playerGlow.enabled = true;

            starveTimer = Time.time;
        }