Beispiel #1
0
    private int timeDivider = 3;    //default

    // Use this for initialization
    void Start()
    {
        timeDivider = Player.isAlive == true ? 1 : 3;

        start = AllColors.GET_COLOR(Player.explodeBoxColorString);
        //for changing the box color
        gameObject.GetComponent <Renderer>().material.color = start;
        end = new Color(start.r, start.g, start.b, 0.0f);
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        timeDivider = Player.isAlive == true ? 1 : 3;

        if (Application.loadedLevelName == AllScenes.MAIN_MENU_SCENE)
        {
            timeDivider = 4;
        }

        if (point)
        {
            start       = new Color(1f, 1f, 1f);
            timeDivider = 2;
        }
        else
        {
            //for changing the box color
            start = AllColors.GET_COLOR(Box.colorCode);
            gameObject.GetComponent <Renderer>().material.color = start;
        }
        end = new Color(start.r, start.g, start.b, 0.0f);
    }
Beispiel #3
0
    }    //updateIndicator

    void ApplyColor()
    {
        gameObject.GetComponent <Renderer>().material.color      = AllColors.GET_COLOR(playerBoxColorString);
        indicatorObject.GetComponent <Renderer>().material.color = AllColors.GET_COLOR(playerBoxColorString);
    }    //ApplyColor