Example #1
0
 // 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;
 }
Example #2
0
 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);
 }
Example #3
0
 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;
     }
 }
Example #4
0
    // 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);
    }
Example #5
0
    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);
    }
Example #6
0
    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);
    }
Example #7
0
    protected void ColorPlaceholder(string fourColorShade)
    {
        //SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();

        spriteRenderer.color = TwoBitColor.GenerateTwoBitColor(fourColorShade);
    }