예제 #1
0
    void Drink(LevelManager.GameColors color)
    {
        switch (color)
        {
        case LevelManager.GameColors.Red:
            gameObject.layer = LayerMask.NameToLayer("Red");
            hudScript.ChangePlayerColor("RED");
            break;

        case LevelManager.GameColors.Green:
            gameObject.layer = LayerMask.NameToLayer("Green");
            hudScript.ChangePlayerColor("GREEN");
            break;

        case LevelManager.GameColors.Blue:
            gameObject.layer = LayerMask.NameToLayer("Blue");
            hudScript.ChangePlayerColor("BLUE");
            break;

        case LevelManager.GameColors.Neutral:
            gameObject.layer = 0;
            hudScript.ChangePlayerColor("");
            break;
        }
    }