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); }
// 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); }
} //updateIndicator void ApplyColor() { gameObject.GetComponent <Renderer>().material.color = AllColors.GET_COLOR(playerBoxColorString); indicatorObject.GetComponent <Renderer>().material.color = AllColors.GET_COLOR(playerBoxColorString); } //ApplyColor