Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        SpriteRenderer renderer = gameObject.GetComponent <SpriteRenderer>();

        switch (Index)
        {
        case PlayerIndex.One:
            UIController.SetName("Player1");
            renderer.sprite = P1Sprite;
            break;

        case PlayerIndex.Two:
            UIController.SetName("Player2");
            renderer.sprite = P2Sprite;
            break;
        }

        UIController.SetActiveWeapon(GetComponent <WeaponManager>().ActiveWeaponType);
    }