예제 #1
0
        public static void Main()
        {
            Directory.SetCurrentDirectory(Path.GetDirectoryName(Application.ExecutablePath));

            BasicConfigurator.Configure();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            LogUtil.Info("Phase 0 - Startup begin.");

            SplashForm         = new SplashForm();
            SplashForm.Visible = true;
            Application.DoEvents();

            DeckPlayer.Play("boom");

            AssetManager = new AssetManager(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "/BubbleCloud/Cache");
            CloudView    = new CloudView(100, DeckConstants.ProgramName, DeckConstants.ProgramMajorVersion, DeckConstants.ProgramMinorVersion);
            DeckEngine   = new DeckEngine();
            DeckRudder   = new DeckRudder();
            DeckRenderer = new DeckRenderer();

            DeckScene     = new DeckScene();
            DeckSelection = new DeckSelection();
            DeckDaemon    = new DeckDaemon();

            MainForm    = new MainForm();
            HudForm     = new HudForm();
            LoadingForm = new LoadingForm();
            LoginForm   = new LoginForm();

            MainForm.AddOwnedForm(SplashForm);
            MainForm.AddOwnedForm(HudForm);
            MainForm.AddOwnedForm(LoadingForm);
            MainForm.AddOwnedForm(LoginForm);

            AssetManager.Startup();

            LogUtil.Info("Phase 0 - Startup end.");
            LogUtil.Info("Phase 1 - Initialization begin.");

            MainLoop();

            LogUtil.Info("Shutdown begin.");
            while (CloudView.IsConnecting || CloudView.IsConnected)
            {
                CloudView.Disconnect();
                while (CloudView.IsConnected)
                {
                    CloudView.Process();
                    Thread.Sleep(10);
                }
            }
            AssetManager.Shutdown();
            DeckRenderer.Shutdown();
            LogUtil.Info("Shutdown done.");
        }
 void Awake()
 {
     _tooltipAir.gameObject.SetActive(false);
     _tooltipEau.gameObject.SetActive(false);
     _tooltipFeu.gameObject.SetActive(false);
     _tooltipBois.gameObject.SetActive(false);
     _tooltipMetal.gameObject.SetActive(false);
     _tooltipTerre.gameObject.SetActive(false);
     DeckSelection = new DeckSelection();
     InstantiateRunes();
 }