Beispiel #1
0
        private void Awake()
        {
            INSTANCE = this;
            Profile.LoadAll();

            mCameraController     = GetComponent <MenuCameraController>();
            mTopBar               = Find <MenuTopBar>("TopBar");
            mBottomBar            = Find <MenuBottomBar>("BottomBar");
            mMain                 = Find <MenuMain>("MainPanel");
            mMain.showEndDelegate = (Action <MenuAbs>)Delegate.Combine(mMain.showEndDelegate, new Action <MenuAbs>(this.MenuShowEnd));
            //mDailyReward = Find<MenuDailyReward>("DailyRewardPanel");
            mMail       = Find <MenuMail>("MailPanel");
            mShop       = Find <MenuShop>("ShopPanel");
            mAchivement = Find <MenuAchivement>("AchivementPanel");
            mSetting    = Find <MenuSetting>("SettingPanel");
            mFirstPage  = Find <MenuFirstPage>("FirstPanel");
            mFirstPage.showEndDelegate = (Action <MenuAbs>)Delegate.Combine(mFirstPage.showEndDelegate, new Action <MenuAbs>(this.MenuShowEnd));
            mMission = Find <MenuMission>("MissionPanel");
            mMission.showEndDelegate = (Action <MenuAbs>)Delegate.Combine(mMission.showEndDelegate, new Action <MenuAbs>(this.MenuShowEnd));
            mOverlay = Find <MenuOverlay>("OverlayPanel");
            // 清空才能再次加载,否则对象存在,对象里的实例已经被销毁
            MenuWeaponLoader.ClearLoaders();
        }
Beispiel #2
0
 private void Start()
 {
     race             = (Race)FindObjectOfType(typeof(Race));
     cameraController = (MenuCameraController)FindObjectOfType(typeof(MenuCameraController));
 }