Ejemplo n.º 1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();


        if (GUILayout.Button("Repaint"))
        {
            RepaintButton();
        }

        if (GUILayout.Button("ChangeBlock"))
        {
            for (int i = 0; i < targets.Length; i++)
            {
                if (targets[i] is CommonButton)
                {
                    CommonButton btnTarget = (CommonButton)targets[i];
                    btnTarget.ChangeBlock();
                    btnTarget.SetStyle();
                    btnTarget.SetBlock();
                }
            }
        }

        if (GUI.changed)
        {
            RepaintButton();
        }
    }
Ejemplo n.º 2
0
    public void Init(int nStage)
    {
        this.nStage = nStage;
        btnStage.Init(StartGame);
        btnStage.SetText(nStage.ToString());
        SetStartPosition();

        if (UserDataManager.Instance.currDifficulty == Difficulty.Easy)
        {
            btnStage.SetStyle(E_COMMON_BUTTON_STYLE.COMMON_STAGE_EASY);
        }
        else if (UserDataManager.Instance.currDifficulty == Difficulty.Normal)
        {
            btnStage.SetStyle(E_COMMON_BUTTON_STYLE.COMMON_STAGE_NORMAL);
        }
        else if (UserDataManager.Instance.currDifficulty == Difficulty.Hard)
        {
            btnStage.SetStyle(E_COMMON_BUTTON_STYLE.COMMON_STAGE_HARD);
        }
    }
Ejemplo n.º 3
0
 private void RepaintButton()
 {
     for (int i = 0; i < targets.Length; i++)
     {
         if (targets[i] is CommonButton)
         {
             CommonButton btnTarget = (CommonButton)targets[i];
             btnTarget.SetStyle();
             btnTarget.SetBlock();
         }
     }
 }