コード例 #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
ファイル: Menu.cs プロジェクト: kaljulee/conway_gol
 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
ファイル: ScrollView.cs プロジェクト: kaljulee/conway_gol
    // 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);
    }