Esempio n. 1
0
    public void ReadyCheck(bool ready)
    {
        if (ready == readyPanel.activeSelf)
        {
            return;
        }

        if (playerSkin.used && ready)
        {
            skinChosen.gameObject.SetActive(true);
            skinChosen.Rewind();
            skinChosen.Play();

            if (shake.isShaking)
            {
                return;
            }

            StartCoroutine(shake.ShakeObject(.15f, transform.parent, 0.025f));

            return;
        }

        playerSkin.used = ready;
        buttonPanel.SetActive(!ready);
        readyPanel.SetActive(ready);
        readyPanel.GetComponent <Image>().color = playerSkin.mainColor;
    }