void OnEnable()
        {
            if (GameManager.instance.gsDataCurrent.tutorialTriggers[(int)TutorialConstants.tutorialTriggers.isTutorial] == true)
            {
                tutorialYes.SetColor("na0");
                tutorialNo.SetColor("normal");
            }
            else
            {
                tutorialYes.SetColor("normal");
                tutorialNo.SetColor("na0");
            }

            if (GameManager.instance.gsDataCurrent.tutorialTriggers[(int)TutorialConstants.tutorialTriggers.isTips] == true)
            {
                tipsYes.SetColor("na0");
                tipsNo.SetColor("normal");
            }
            else
            {
                tipsYes.SetColor("normal");
                tipsNo.SetColor("na0");
            }

            if (GameManager.instance.gsDataCurrent.animationSpeed == 1f)
            {
                as1.SetColor("na0");
                as2.SetColor("normal");
            }
            else
            {
                as1.SetColor("normal");
                as2.SetColor("na0");
            }

            if (UIManager.instance.isTimer == true)
            {
                timerYes.SetColor("na0");
                timerNo.SetColor("normal");
            }
            else
            {
                timerYes.SetColor("normal");
                timerNo.SetColor("na0");
            }
            if (Screen.fullScreen == true)
            {
                fullscreenYes.SetColor("na0");
                fullscreenNo.SetColor("normal");
            }
            else
            {
                fullscreenYes.SetColor("normal");
                fullscreenNo.SetColor("na0");
            }

            bgmSlider.value = AudioManager.instance.bgmVolume;
            sfxSlider.value = AudioManager.instance.sfxVolume;
        }
        /// <summary>
        /// Toggle select button's colouring to show if its enabled or disabled
        /// </summary>
        public void SetSelectButtonEnabled(bool value)
        {
            selectButtonEnabled = value;

            if (value == false)
            {
                sbBts.SetColor("normal");
            }
            else
            {
                sbBts.SetColor("na0");
            }
        }
Exemple #3
0
 /// <summary>
 /// Toggle select button's colouring to show if its enabled or disabled
 /// </summary>
 public void ToggleSelectButton()
 {
     if (!selectButtonEnabled)
     {
         selectButtonEnabled = true;
         sbBts.SetColor("normalAlternate");
     }
     else
     {
         selectButtonEnabled = false;
         sbBts.SetColor("normal");
     }
 }
 /// <summary>
 /// Sets the bts to show the normal colour block
 /// </summary>
 public void ShowNormal()
 {
     bts.SetColor("normal");
     // if (gameObject.activeSelf == true && gameObject.activeInHierarchy) {
     //     if (lerper != null) {
     //         StopCoroutine(lerper);
     //     }
     //     lerper = StartCoroutine(LerpBackgroundColour(backgroundNormalColor));
     // }
     // else {
     background.color = backgroundNormalColor;
     // }
 }
        /// <summary>
        /// Initialize a skillDisplay, displaying the skill's icon and preparing the possible colourings
        /// for if the skill is enabled or not.
        /// </summary>
        /// <param name="skillIndex"></param>
        /// <param name="displayedSkill"></param>
        /// <param name="skillSprite"></param>
        /// <param name="skillColour"></param>
        /// <param name="pmd"></param>
        public void Init(int skillIndex, Skill displayedSkill, Sprite skillSprite, Color skillColour, PartyMemberDisplay pmd)
        {
            skillSpriteRenderer.sprite = skillSprite;
            this.skillColour           = skillColour;
            this.skillIndex            = skillIndex;
            this.skillDisplayEnabled   = displayedSkill.skillEnabled;
            this.displayedSkill        = displayedSkill;
            this.pmd = pmd;
            SetTooltip();

            ColorBlock normalBlock = b.colors;

            if (skillDisplayEnabled == true)
            {
                normalBlock.normalColor      = new Color(skillColour.r, skillColour.g, skillColour.b, 0.75f);
                normalBlock.highlightedColor = skillColour;
                normalBlock.pressedColor     = skillColour;
                normalBlock.disabledColor    = new Color(skillColour.r, skillColour.g, skillColour.b, 0.33f);
                skillSpriteRenderer.color    = skillColour;
                bts.SetColorBlock("normal", normalBlock);
                bts.SetColor("normal");
            }
            else
            {
                normalBlock.normalColor      = new Color32(99, 99, 99, 255);
                normalBlock.highlightedColor = new Color32(141, 141, 141, 255);
                normalBlock.pressedColor     = new Color32(255, 255, 255, 255);
                normalBlock.disabledColor    = new Color32(61, 61, 61, 255);
                skillSpriteRenderer.color    = new Color32(133, 133, 133, 255);
                bts.SetColorBlock("normal", normalBlock);
                bts.SetColor("normal");
            }
        }
 /// <summary>
 /// Visually select monster with pressed colour
 /// </summary>
 public void SelectMonsterButton()
 {
     bts.SetColor("pressed");
 }
Exemple #7
0
 /// <summary>
 /// Change button colour to show it is selected after user navigates away from it after selecting
 /// </summary>
 public void ShowActionSelected()
 {
     bts.SetColor("pressed");
 }
Exemple #8
0
        // public void InitMirror(StatusEffectDisplay sed) {
        //     this.se = sed.se;
        //     gameObject.SetActive(false);
        //     SetColour();
        //     UpdateText();
        //     gameObject.SetActive(true);
        //     SetTooltip();
        // }

        public void SetColour()
        {
            ColorBlock normalBlock = b.colors;

            switch (se.name)
            {
            case StatusEffectConstant.BURN:
                normalBlock.normalColor      = new Color32(185, 29, 0, 200);
                normalBlock.highlightedColor = new Color32(185, 29, 0, 255);
                normalBlock.pressedColor     = new Color32(185, 29, 0, 255);
                normalBlock.disabledColor    = new Color32(185, 29, 0, 150);
                durationText.SetColour(new Color32(185, 29, 0, 255));
                break;

            case StatusEffectConstant.POISON:
                normalBlock.normalColor      = new Color32(92, 138, 57, 200);
                normalBlock.highlightedColor = new Color32(92, 138, 57, 255);
                normalBlock.pressedColor     = new Color32(92, 138, 57, 255);
                normalBlock.disabledColor    = new Color32(92, 138, 57, 150);
                durationText.SetColour(new Color32(92, 138, 57, 255));
                break;

            case StatusEffectConstant.FROSTBITE:
            case StatusEffectConstant.FREEZE:
                normalBlock.normalColor      = new Color32(0, 152, 220, 200);
                normalBlock.highlightedColor = new Color32(0, 152, 220, 255);
                normalBlock.pressedColor     = new Color32(0, 152, 220, 255);
                normalBlock.disabledColor    = new Color32(0, 152, 220, 150);
                durationText.SetColour(new Color32(0, 152, 220, 255));
                break;

            case StatusEffectConstant.TAUNT:
            case StatusEffectConstant.RAGE:
                normalBlock.normalColor      = new Color32(234, 50, 60, 200);
                normalBlock.highlightedColor = new Color32(234, 50, 60, 255);
                normalBlock.pressedColor     = new Color32(234, 50, 60, 255);
                normalBlock.disabledColor    = new Color32(234, 50, 60, 150);
                durationText.SetColour(new Color32(234, 50, 60, 255));
                break;

            case StatusEffectConstant.FATALWOUND:
            case StatusEffectConstant.VAMPIRE:
            case StatusEffectConstant.BLEED:
                normalBlock.normalColor      = new Color32(138, 7, 7, 200);
                normalBlock.highlightedColor = new Color32(138, 7, 7, 255);
                normalBlock.pressedColor     = new Color32(138, 7, 7, 255);
                normalBlock.disabledColor    = new Color32(138, 7, 7, 150);
                durationText.SetColour(new Color32(138, 7, 7, 255));
                break;

            case StatusEffectConstant.WEAKNESS:
                normalBlock.normalColor      = new Color32(98, 36, 97, 200);
                normalBlock.highlightedColor = new Color32(98, 36, 97, 255);
                normalBlock.pressedColor     = new Color32(98, 36, 97, 255);
                normalBlock.disabledColor    = new Color32(98, 36, 97, 150);
                durationText.SetColour(new Color32(98, 36, 97, 255));
                break;

            case StatusEffectConstant.ADVANTAGE:
                normalBlock.normalColor      = new Color32(230, 126, 34, 200);
                normalBlock.highlightedColor = new Color32(230, 126, 34, 255);
                normalBlock.pressedColor     = new Color32(230, 126, 34, 255);
                normalBlock.disabledColor    = new Color32(230, 126, 34, 150);
                durationText.SetColour(new Color32(230, 126, 34, 255));
                break;

            case StatusEffectConstant.ROOT:
                normalBlock.normalColor      = new Color32(93, 44, 40, 200);
                normalBlock.highlightedColor = new Color32(93, 44, 40, 255);
                normalBlock.pressedColor     = new Color32(93, 44, 40, 255);
                normalBlock.disabledColor    = new Color32(93, 44, 40, 150);
                durationText.SetColour(new Color32(93, 44, 40, 255));
                break;

            case StatusEffectConstant.STUN:
                normalBlock.normalColor      = new Color32(255, 205, 2, 200);
                normalBlock.highlightedColor = new Color32(255, 205, 2, 255);
                normalBlock.pressedColor     = new Color32(255, 205, 2, 255);
                normalBlock.disabledColor    = new Color32(255, 205, 2, 150);
                durationText.SetColour(new Color32(255, 205, 2, 255));
                break;

            case StatusEffectConstant.SHOCK:
                normalBlock.normalColor      = new Color32(255, 235, 87, 200);
                normalBlock.highlightedColor = new Color32(255, 235, 87, 255);
                normalBlock.pressedColor     = new Color32(255, 235, 87, 255);
                normalBlock.disabledColor    = new Color32(255, 235, 87, 150);
                durationText.SetColour(new Color32(255, 235, 87, 255));
                break;

            case StatusEffectConstant.REGENERATE:
                normalBlock.normalColor      = new Color32(90, 197, 79, 200);
                normalBlock.highlightedColor = new Color32(90, 197, 79, 255);
                normalBlock.pressedColor     = new Color32(90, 197, 79, 255);
                normalBlock.disabledColor    = new Color32(90, 197, 79, 255);
                durationText.SetColour(new Color32(90, 197, 79, 255));
                break;

            case StatusEffectConstant.GUARD:
                normalBlock.normalColor      = new Color32(155, 66, 28, 200);
                normalBlock.highlightedColor = new Color32(155, 66, 28, 255);
                normalBlock.pressedColor     = new Color32(155, 66, 28, 255);
                normalBlock.disabledColor    = new Color32(155, 66, 28, 150);
                durationText.SetColour(new Color32(155, 66, 28, 255));
                break;

            case StatusEffectConstant.CURE:
                normalBlock.normalColor      = new Color32(125, 237, 164, 200);
                normalBlock.highlightedColor = new Color32(125, 237, 164, 255);
                normalBlock.pressedColor     = new Color32(125, 237, 164, 255);
                normalBlock.disabledColor    = new Color32(125, 237, 164, 150);
                durationText.SetColour(new Color32(125, 237, 164, 255));
                break;

            case StatusEffectConstant.TRAP:
                normalBlock.normalColor      = new Color32(133, 133, 133, 200);
                normalBlock.highlightedColor = new Color32(133, 133, 133, 255);
                normalBlock.pressedColor     = new Color32(133, 133, 133, 255);
                normalBlock.disabledColor    = new Color32(133, 133, 133, 150);
                durationText.SetColour(new Color32(133, 133, 133, 255));
                break;

            case StatusEffectConstant.MIRACLE:
                normalBlock.normalColor      = new Color32(208, 208, 208, 200);
                normalBlock.highlightedColor = new Color32(208, 208, 208, 255);
                normalBlock.pressedColor     = new Color32(208, 208, 208, 255);
                normalBlock.disabledColor    = new Color32(208, 208, 208, 150);
                durationText.SetColour(new Color32(208, 208, 208, 255));
                break;

            case StatusEffectConstant.BARRIER:
                normalBlock.normalColor      = new Color32(60, 50, 234, 200);
                normalBlock.highlightedColor = new Color32(60, 50, 234, 255);
                normalBlock.pressedColor     = new Color32(60, 50, 234, 255);
                normalBlock.disabledColor    = new Color32(60, 50, 234, 150);
                durationText.SetColour(new Color32(60, 50, 234, 255));
                break;

            case StatusEffectConstant.MARIONETTE:
                normalBlock.normalColor      = new Color32(99, 33, 197, 200);
                normalBlock.highlightedColor = new Color32(99, 33, 197, 255);
                normalBlock.pressedColor     = new Color32(99, 33, 197, 255);
                normalBlock.disabledColor    = new Color32(99, 33, 197, 150);
                durationText.SetColour(new Color32(99, 33, 197, 255));
                break;

            case StatusEffectConstant.NIMBLE:
                normalBlock.normalColor      = new Color32(0, 111, 135, 200);
                normalBlock.highlightedColor = new Color32(0, 111, 135, 255);
                normalBlock.pressedColor     = new Color32(0, 111, 135, 255);
                normalBlock.disabledColor    = new Color32(0, 111, 135, 150);
                durationText.SetColour(new Color32(0, 111, 135, 255));
                break;

            case StatusEffectConstant.ETHEREAL:
                normalBlock.normalColor      = new Color32(209, 201, 255, 200);
                normalBlock.highlightedColor = new Color32(209, 201, 255, 255);
                normalBlock.pressedColor     = new Color32(209, 201, 255, 255);
                normalBlock.disabledColor    = new Color32(209, 201, 255, 150);
                durationText.SetColour(new Color32(209, 201, 255, 255));
                break;

            case StatusEffectConstant.BREAK:
                normalBlock.normalColor      = new Color32(255, 152, 168, 200);
                normalBlock.highlightedColor = new Color32(255, 152, 168, 255);
                normalBlock.pressedColor     = new Color32(255, 152, 168, 255);
                normalBlock.disabledColor    = new Color32(255, 152, 168, 255);
                durationText.SetColour(new Color32(255, 152, 168, 255));
                break;

            case StatusEffectConstant.BOSS:
            case StatusEffectConstant.FAMILIAR:
            case StatusEffectConstant.CHAMPIONHP:
            case StatusEffectConstant.CHAMPIONPATK:
            case StatusEffectConstant.CHAMPIONMATK:
            case StatusEffectConstant.CHAMPIONPDEF:
            case StatusEffectConstant.CHAMPIONMDEF:
                normalBlock.normalColor      = new Color32(255, 255, 255, 200);
                normalBlock.highlightedColor = new Color32(255, 255, 255, 255);
                normalBlock.pressedColor     = new Color32(255, 255, 255, 255);
                normalBlock.disabledColor    = new Color32(255, 255, 255, 150);
                durationText.SetColour(new Color32(255, 255, 255, 255));
                break;

            case StatusEffectConstant.SCUM:
                normalBlock.normalColor      = new Color32(61, 61, 61, 200);
                normalBlock.highlightedColor = new Color32(61, 61, 61, 255);
                normalBlock.pressedColor     = new Color32(61, 61, 61, 255);
                normalBlock.disabledColor    = new Color32(61, 61, 61, 150);
                durationText.SetColour(new Color32(61, 61, 61, 255));
                break;
            }

            bts.SetColorBlock("normal", normalBlock);
            bts.SetColor("normal");
        }
Exemple #9
0
 /// <summary>
 /// Change button colour to show it is selected after user navigates away from it after selecting
 /// </summary>
 public void ShowActionSelected()
 {
     bts.SetColor("highlighted");
     btsBlockName = "highlighted";
 }