示例#1
0
 void HandleOnColorChanged()
 {
     for (int i = 0; i < rightColorSprites.Length; i++)
     {
         if (i < ColorFullMode.GetInstance().RightColors.Count)
         {
             rightColorSprites[i].color = ColorFullMode.GetInstance().RightColors[i];
             rightColorSprites[i].gameObject.SetActive(true);
         }
         else
         {
             rightColorSprites[i].gameObject.SetActive(false);
         }
     }
     rightColorGrid.Reposition();
 }
示例#2
0
    // Use this for initialization
    void Start()
    {
        GameSystem.GetInstance().OnWaveNumberChanged    += HandleOnWaveNumberChanged;
        GameSystem.GetInstance().OnScoreChanged         += HandleOnScoreChanged;
        SurvivalMode.GetInstance().OnHPChanged          += HandleOnHPChanged;
        TimeRushMode.GetInstance().OnLifeTimeChanged    += HandleOnLifeTimeChanged;
        ColorFullMode.GetInstance().OnColorChanged      += HandleOnColorChanged;
        BlackJackMode.GetInstance().OnSelectCardChanged += HandleOnSelectCardChanged;
        DualMode.GetInstance().OnTurnChanged            += HandleOnTurnChanged;
        DualMode.GetInstance().OnLeftHPChanged          += HandleOnLeftHPChanged;
        DualMode.GetInstance().OnRightHPChanged         += HandleOnRightHPChanged;
        WordMode.GetInstance().OnWordTextChanged        += HandleOnWordTextChanged;
        translationLabel.gameObject.SetActive(LocalVersion.local == LocalVersion.Local.CN_ZH);

        dualLeftSideSlider.foregroundWidget.color  = Constant.LEFT_COLOR;
        dualRightSideSlider.foregroundWidget.color = Constant.RIGHT_COLOR;
    }