Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (CharacterSelect.GetP() == 1)
        {
            GetComponent <SpriteRenderer>().sprite = firstP;

            /*
             * character = 1;
             * if (S1 == false)
             * {
             *  GetComponent<SpriteRenderer>().sprite = firstPX;
             *
             * }
             */
        }
        if (CharacterSelect.GetP() == 2)
        {
            GetComponent <SpriteRenderer>().sprite = SecondP;

            /*
             * character = 2;
             * if (S2 == false)
             * {
             *  GetComponent<SpriteRenderer>().sprite = SecondPX;
             *
             * }
             */
        }
    }