コード例 #1
0
    void Awake()
    {
        DontDestroyOnLoad(this.gameObject);

        EventManager.PlayerDie.AddListener(OnPlayerDie);
        EventManager.PlayerPass.AddListener(OnPlayerPass);
        EventManager.AfterRewardAd.AddListener(OnRewardWatch);
        EventManager.AfterRelifeAd.AddListener(OnRelife);

        audioSource = GetComponent <AudioSource> ();

        invokeButton   = GameObject.Find("ButtonInvoke").GetComponent <Button> ();
        windButton     = GameObject.Find("ButtonWind").GetComponent <Button> ();
        fireButton     = GameObject.Find("ButtonFire").GetComponent <Button> ();
        electricButton = GameObject.Find("ButtonElectric").GetComponent <Button> ();

        spellBox        = GameObject.Find("SpellBox");
        spellText       = GameObject.Find("SpellText").GetComponent <Text> ();
        spellBoxGuiAnim = spellBox.GetComponent <GUIAnim> ();
        spellBox.SetActive(false);

        lifeNumberText = GameObject.Find("LifeNumber").GetComponent <Text> ();
        keyNumberText  = GameObject.Find("KeyNumber").GetComponent <Text>();
        wonKeyText     = GameObject.Find("WonKeyText").GetComponent <Text> ();
        winVideoButton = GameObject.Find("WinVideoButton");
        spendKeyButton = GameObject.Find("SpendKeyButton").GetComponent <Button>();
        lvSkipButton   = GameObject.Find("LvSkipButton").GetComponent <Button>();
        uiCanvas       = GameObject.Find("UI_Canvas");
        pausePanel     = GameObject.Find("PausePanel");
        failPanel      = GameObject.Find("FailPanel");
        clearPanel     = GameObject.Find("ClearPanel");
        pauseMenu      = GameObject.Find("PauseMenu");
        bookWWW_1      = GameObject.Find("BookWWW_1");
        bookWWF_2      = GameObject.Find("BookWWF_2");
        bookWWL_3      = GameObject.Find("BookWWL_3");
        bookFFF_4      = GameObject.Find("BookFFF_4");
        bookFFW_5      = GameObject.Find("BookFFW_5");
        bookFFL_6      = GameObject.Find("BookFFL_6");
        bookLLL_7      = GameObject.Find("BookLLL_7");
        bookLLW_8      = GameObject.Find("BookLLW_8");
        bookLLF_9      = GameObject.Find("BookLLF_9");
        bookWFL_10     = GameObject.Find("BookWFL_10");
        uiCanvas.SetActive(false);
        pauseMenu.SetActive(false);
        pausePanel.SetActive(false);
        failPanel.SetActive(false);
        clearPanel.SetActive(false);
        bookWWW_1.SetActive(false);
        bookWWF_2.SetActive(false);
        bookWWL_3.SetActive(false);
        bookFFF_4.SetActive(false);
        bookFFW_5.SetActive(false);
        bookFFL_6.SetActive(false);
        bookLLL_7.SetActive(false);
        bookLLW_8.SetActive(false);
        bookLLF_9.SetActive(false);
        bookWFL_10.SetActive(false);
    }
コード例 #2
0
ファイル: GUIAnimEditor.cs プロジェクト: frozen4/UnityPlus
    protected virtual void OnEnable()
    {
        _UIAnim = target as GUIAnim;

        _AnimList  = serializedObject.FindProperty("AnimEvents");
        _SoundList = serializedObject.FindProperty("SoundEvents");
        _FxList    = serializedObject.FindProperty("FxEvents");
        _ATList    = serializedObject.FindProperty("AnimTrans");

        _ct_fade = new GUIContent("fade");
        _ct_from = new GUIContent("from");
        _ct_name = new GUIContent("Name");
        _ct_to   = new GUIContent("Transist to");
        _ct_add  = new GUIContent("Add new");
    }