コード例 #1
0
    // ########################################
    // Toggle button functions
    // ########################################

    #region Toggle Button

    // Toggle TopLeft buttons
    public void display_intro()
    {
        intro_panel.MoveIn(GUIAnimSystemFREE.eGUIMove.SelfAndChildren);
        buy_button.MoveIn(GUIAnimSystemFREE.eGUIMove.SelfAndChildren);
        cancel_button.MoveIn(GUIAnimSystemFREE.eGUIMove.SelfAndChildren);
        reset_buy_button();
        if (intro_panel_data.GetComponent <ItemIntroData> ().is_bought)
        {
            if (intro_panel_data.GetComponent <ItemIntroData> ().is_equipped)
            {
                buy_button.GetComponent <Button> ().interactable = false;
                buy_button.GetComponentInParent <ItemIntroData> ().buy_text.text = "Equipped";
            }
            else
            {
                buy_button.GetComponentInParent <ItemIntroData> ().buy_text.text = "Equip";
            }
        }
    }
コード例 #2
0
ファイル: SelectLevelScene.cs プロジェクト: diaosuyidsy/Crush
    // Get Star setup
    void GetLevelSetup(GUIAnimFREE Dialog)
    {
        int    levelnum = Dialog.GetComponentInParent <LevelInfo> ().GetLevelNumber();
        Levels levels   = GameData.gd.Load();

        if (levels != null)
        {
            Dictionary <int, Level> levelBook = levels.LevelBook;
            if (levelBook != null)
            {
                if (levelBook.ContainsKey(levelnum))
                {
                    int starNum = levelBook [levelnum].starNum;
                    Dialog.GetComponentInParent <LevelInfo> ().Enable_Stars(starNum);
                    Dialog.gameObject.GetComponent <Button> ().interactable = true;
                }
            }
        }
    }