// Start is called before the first frame update void Start() { mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); mainCamera.GetComponent <Camera>().backgroundColor = TwoBitColor.GenerateTwoBitColor(TwoBitColor.LIGHTEST); SetSpawnCenter(boardScript.BoardCenter()); Screen.sleepTimeout = SleepTimeout.NeverSleep; }
private void Awake() { slider = gameObject.GetComponent <Slider>(); images = slider.GetComponentsInChildren <Image>(); // background images[0].color = TwoBitColor.GenerateTwoBitColor(TwoBitColor.LIGHTEST); // fill images[1].color = TwoBitColor.GenerateTwoBitColor(TwoBitColor.DARK); // handle images[2].color = TwoBitColor.GenerateTwoBitColor(TwoBitColor.LIGHT); }
protected void Awake() { image = GetComponent <Image>(); rectTransform = GetComponent <RectTransform>(); if (image) { string fourColorShade = TwoBitColor.LIGHT; Color color = TwoBitColor.GenerateTwoBitColor(fourColorShade); color.a = 0.2f; image.color = color; } }
// Start is called before the first frame update void Start() { //images = GetComponentsInChildren<Image>(); scrollbar = transform.Find("Scrollbar Vertical").gameObject; images = scrollbar.GetComponentsInChildren <Image>(); viewBackground = GetComponentsInChildren <Image>()[0]; viewBackground.color = TwoBitColor.GenerateTwoBitColor(TwoBitColor.LIGHT); images[0].color = TwoBitColor.GenerateTwoBitColor(TwoBitColor.LIGHT); images[1].color = TwoBitColor.GenerateTwoBitColor(TwoBitColor.DARK); }
protected void Awake() { image = GetComponent <Image>(); rectTransform = GetComponent <RectTransform>(); SetWidthAndHeight(); rectTransform.sizeDelta = new Vector2(width, height); if (fourColorShade == null) { fourColorShade = TwoBitColor.DARK; } image.color = TwoBitColor.GenerateTwoBitColor(fourColorShade); }
void Awake() { image = transform.GetChild(0).GetComponent <Image>(); text = GetComponentInChildren <Text>(); string fourColorShade = TwoBitColor.LIGHTEST; string textFourColorShade = TwoBitColor.DARKEST; image.color = TwoBitColor.GenerateTwoBitColor(fourColorShade); text.color = TwoBitColor.GenerateTwoBitColor(textFourColorShade); }
protected void ColorPlaceholder(string fourColorShade) { //SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>(); spriteRenderer.color = TwoBitColor.GenerateTwoBitColor(fourColorShade); }