Пример #1
0
        private void Awake() {
            var clearWhite = new Color(1, 1, 1, 0);

            HeldButtonUi.AddTo(this.menuNewSessionButtonImage, Inputs.PrimaryButton);
            HeldButtonUi.AddTo(this.menuExitGameButtonImage, Inputs.ExitButton);

            FloatTarget.AddTo(this.gameObject,
                v => {
                    this._currentRotation = v;
                    this.transform.eulerAngles = new Vector3(0, v, 0);
                },
                () => this._currentRotation,
                () => this._targetRotation, 7, TargetCurve.Easing);

            // Fade entire canvas in and out.
            this.headerText.color = clearWhite;
            this.resultsText.color = clearWhite;
            this.menuNewSessionText.color = clearWhite;
            this.menuExitGameText.color = clearWhite;
            this.instructionsText.color = clearWhite;
            ColorTarget.AddToTextGUIColor(this.headerText, this.ActiveColor);
            ColorTarget.AddToTextGUIColor(this.resultsText, this.ActiveColor);
            ColorTarget.AddToTextGUIColor(this.menuNewSessionText, this.ActiveColor);
            ColorTarget.AddToTextGUIColor(this.menuExitGameText, this.ActiveColor);
            ColorTarget.AddToTextGUIColor(this.instructionsText, this.ActiveColor);

            this.SetVisible(false);
        }
Пример #2
0
 private void Start()
 {
     this.numerator.color    = InvisibleColor;
     this.denominator.color  = InvisibleColor;
     this.dividingLine.color = InvisibleColor;
     ColorTarget.AddToTextGUIColor(this.numerator, () => this.IsActive && this._visible ? VisibleColor : InvisibleColor, FadeSpeed);
     ColorTarget.AddToTextGUIColor(this.denominator, () => this.IsActive && this._visible ? VisibleColor : InvisibleColor, FadeSpeed);
     ColorTarget.AddToImageColor(this.dividingLine, () => this.IsActive && this._visible ? VisibleColor : InvisibleColor, FadeSpeed);
 }
Пример #3
0
        private void Awake()
        {
            this.titleText.color       = this.titleText.color.AsTransparent();
            this.startButtonText.color = this.startButtonText.color.AsTransparent();
            this.exitButtonText.color  = this.exitButtonText.color.AsTransparent();

            ColorTarget.AddToTextGUIColor(this.titleText,
                                          () => this._isActive ? this.titleText.color.AsOpaque() : this.titleText.color.AsTransparent());
            ColorTarget.AddToTextGUIColor(this.startButtonText,
                                          () => this._isActive ? this.startButtonText.color.AsOpaque() : this.startButtonText.color.AsTransparent());
            ColorTarget.AddToTextGUIColor(this.exitButtonText,
                                          () => this._isActive ? this.exitButtonText.color.AsOpaque() : this.exitButtonText.color.AsTransparent());


            HeldButtonUi.AddTo(this.startButtonImage, Inputs.PrimaryButton);
            HeldButtonUi.AddTo(this.exitButtonImage, Inputs.ExitButton);
        }
Пример #4
0
        private void Awake()
        {
            for (var i = 0; i < this.textMeshes.Length; i++)
            {
                var textMesh = this.textMeshes[i];
                var index    = i;
                ColorTarget.AddToTextGUIColor(textMesh,
                                              () => new Color(1, 1, 1,
                                                              this._showMeshArray != null && this._showMeshArray.Length > index && this._showMeshArray[index]
                            ? 1f
                            : 0f),
                                              NormalSpeed);
            }

            FloatTarget.AddTo(this.gameObject, v => {
                this._currentAngle         = v;
                this.transform.eulerAngles = new Vector3(0, this._currentAngle, 0);
            },
                              () => this._currentAngle,
                              () => this._currentAngleTarget, 1f, TargetCurve.Easing);
        }