Ejemplo n.º 1
0
        void Start()
        {
            Screen.sleepTimeout         = SleepTimeout.NeverSleep;
            Application.targetFrameRate = 30;
            preload.onProgress         += OnProgress;
            preload.onStateChange      += OnStageChange;
            preload.onError            += OnError;
            preload.StartPreload(new ILRuntimeGenerics());

            AudioDevice.Create("music").Play(Resources.Load <AudioClip>("PreloadBGM"), true);
        }
Ejemplo n.º 2
0
        void Init()
        {
            Application.targetFrameRate = 60;

            AudioDevice.Create("bgm");
            AudioDevice.Create("effect");

            //加载ILRuntimePrefab;
            GameObject mainPrefab = ResMgr.Ins.Load <GameObject>(ZeroConst.ROOT_AB_FILE_NAME, "ILContent");
            var        ilContent  = ViewFactory.Create <ILContentView>(mainPrefab, null);

            ilContent.gameObject.name = mainPrefab.name;
        }
Ejemplo n.º 3
0
        void Init()
        {
            Application.targetFrameRate = 60;

            AudioDevice.Create("bgm");
            AudioDevice.Create("effect");

            var ILContent   = GameObject.Find("ILContent");
            var stageRoot   = ILContent.transform.Find("Stage");
            var uiPanelRoot = ILContent.transform.Find("UICanvas/UIPanel");
            var uiWinRoot   = ILContent.transform.Find("UICanvas/UIWin");

            StageMgr.Ins.Init(stageRoot);
            UIPanelMgr.Ins.Init(uiPanelRoot);
            UIWinMgr.Ins.Init(uiWinRoot);
        }
Ejemplo n.º 4
0
        public static void Main()
        {
            new ScreenChecker();
            DOTween.defaultEaseType = Ease.Linear;
            DOTween.Init();
            Application.targetFrameRate = 60;
            UIPanelMgr.Ins.Init(GameObject.Find("UIPanel").transform);
            StageMgr.Ins.Init(GameObject.Find("Stage").transform);
            UIWinMgr.Ins.Init(GameObject.Find("UIWin").transform);
            RegistViews();
            Global.Ins.menu.ShowMenu();

            Global.Ins.bgmDevice    = AudioDevice.Create("Bgm");
            Global.Ins.effectDevice = AudioDevice.Create("Effect");

            Global.Ins.bgmDevice.Play(ResMgr.Ins.Load <AudioClip>("hot_res/audios/bgm"));

            if (Debug.isDebugBuild)
            {
                GUIDeviceInfo.Show();
            }
        }