Esempio n. 1
0
    void ChangeStanceNow()
    {
        randomizer = Random.Range(0, classDanceSprites.Count);
        while (randomizer == prevRand)
        {
            randomizer = Random.Range(0, classDanceSprites.Count);
        }

        prevRand = randomizer;

        for (int i = 0; i < listOfClassObjects.Count; i++)
        {
            SpriteRenderer temp = listOfClassObjects [i].GetComponent <SpriteRenderer> ();

            temp.sprite = classDanceSprites [randomizer];
        }
        if (friendScript.GiveFriendMovementBool() == false)
        {
            SpriteRenderer temp = friendObject.GetComponent <SpriteRenderer> ();

            temp.sprite = friendDanceSprites [randomizer];
        }

        Invoke("ChangeStanceNow", timeToChangeStances);
    }
Esempio n. 2
0
    void SpriteShiftFunction(int keyShifter)
    {
        if (isFriend == false || isFriend == true && minigameFourFriendGrabCall.GiveFriendMovementBool())
        {
            SpriteRenderer temp = playerObject.GetComponent <SpriteRenderer> ();

            temp.sprite = playerSprites [keyShifter];

            CancelInvoke();

            Invoke("idleFunction", 1);
        }
    }
    void OnTriggerEnter2D(Collider2D other)
    {
        //If friendGrab = false, it sends it to the friendless basement.
        //If friendGrab is true, it sends it to the friend basement.
        friendGrab = friendScript.GiveFriendMovementBool();

        if (friendGrab == true && other.tag == "Player")
        {
            SceneManager.LoadScene("Basement5");
        }
        //else
        //SceneManager.LoadScene ("Basement5");
    }