示例#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;
 }
示例#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);
 }
示例#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;
     }
 }
示例#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);
    }
示例#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);
    }
示例#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);
    }
示例#7
0
    protected void ColorPlaceholder(string fourColorShade)
    {
        //SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();

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