Esempio n. 1
0
    void Distraction()
    {
        Chick settingTgt = bbychick.GetComponent <Chick>();


        float distractDis = Vector2.Distance(chick.transform.position, transform.position);

        if (distractDis < 2)
        {
            settingTgt.SetTarget(transform);
            close = true;
        }
    }
Esempio n. 2
0
    void HideChick()
    {
        Chick settingTgt = chick.GetComponent <Chick>();

        if (Input.GetButtonDown(hideButton) || Input.GetAxisRaw(hideButton) > 0)
        {
            GameManager.instance.hideTheChick = true;
            settingTgt.SetTarget(transform);
            mySpriteRenderer.sortingOrder = 2;
        }
        else if (Input.GetButtonUp(hideButton) || Input.GetAxisRaw(hideButton) <= 0)
        {
            GameManager.instance.hideTheChick = false;
            mySpriteRenderer.sortingOrder     = 0;
        }
    }
Esempio n. 3
0
    void HideChick()
    {
        if (!GameManager.instance.restartingFromLastCheckpoint)
        {
            Chick settingTgt = chick.GetComponent <Chick>();

            if (Input.GetButtonDown(hideButton) || Input.GetAxisRaw(hideButton) > 0)
            {
                GameManager.instance.hideTheChick = true;
                settingTgt.SetTarget(transform);
            }
            else if (Input.GetButtonUp(hideButton) || Input.GetAxisRaw(hideButton) <= 0)
            {
                GameManager.instance.hideTheChick = false;
            }
        }
    }