Ejemplo n.º 1
0
        //----------------------------------------------------------------------
        protected override void Initialize()
        {
            base.Initialize();

            SetWindowTitle("NuclearWinter Sample");

            //------------------------------------------------------------------
            Window.AllowUserResizing = true;
#if !FNA
            Form.MinimumSize = new System.Drawing.Size(1260, 720);
#endif

            IsMouseVisible = true;

            //------------------------------------------------------------------
            // Game states
            Intro    = new GameStates.GameStateIntro(this);
            MainMenu = new GameStates.GameStateMainMenu(this);
            GameStateMgr.SwitchState(Intro);

            //------------------------------------------------------------------
#if !FNA
            Form.Resize += delegate { EnsureProperPresentationParams(); };
#endif
        }
Ejemplo n.º 2
0
    public void Start()
    {
        m_gameStateMgr = new GameStateMgr();
        m_gameStateMgr.Start();

        InitGameState();
    }
Ejemplo n.º 3
0
    private void Awake()
    {
        Ins                     = this;
        Log                     = new Log();
        ActiveState             = new List <PersistState>();
        GameOverlay             = new GameOverlayDialogState();
        FightState              = new FightState();
        ReplayState             = new ReplayState();
        NickNameDialogState     = new NickNameDialogState();
        BattleStatusDialogState = new BattleStatusDialogState();
        PlayerDialogState       = new PlayerDialogState();
        ChatDialogState         = new ChatDialogState();
        PsdEditDialogState      = new PsdEditDialogState();
        RoomChatDialogState     = new RoomChatDialogState();
        LoadingEx               = new LoadingEXDialogState();
        ItemInfoDialogState     = new ItemInfoDialogState();
        GunShootDialogStatus    = new GunShootDialogStatus();
        //面板管理器.
        DialogStateManager = new MainDialogStateManager();
        //顺序排队弹出框.
        PopupStateManager = new MainPopupStateManager();
        //各类游戏数据.
        GameStateMgr    = new GameStateMgr();
        UpdateHelper    = new UpdateHelper();
        AppInfo         = new AppInfo();
        CombatData      = new CombatData();
        GameNotice      = new GameNotice();
        MeteorManager   = new MeteorManager();
        ScriptMng       = new ScriptMng();
        SFXLoader       = new SFXLoader();
        ActionInterrupt = new ActionInterrupt();

        BuffMng         = new BuffMng();
        EventBus        = new EventBus();
        NetWorkBattle   = new NetWorkBattle();
        SceneMng        = new SceneMng();
        FrameSync       = new FrameSync();
        MeteorBehaviour = new MeteorBehaviour();
        DropMng         = new DropMng();
        //原版相关资源的加载器.
        MenuResLoader    = new MenuResLoader();
        SkcLoader        = new SkcLoader();
        BncLoader        = new BncLoader();
        FMCLoader        = new FMCLoader();
        GMBLoader        = new GMBLoader();
        GMCLoader        = new GMCLoader();
        DesLoader        = new DesLoader();
        FMCPoseLoader    = new FMCPoseLoader();
        DataMgr          = new DataMgr();
        SfxMeshGenerator = new SfxMeshGenerator();
        RoomMng          = new RoomMng();
        SoundManager     = new SoundManager();
        ResMng           = new ResMng();
        DlcMng           = new DlcMng();

        DontDestroyOnLoad(gameObject);
        Log.WriteError(string.Format("GameStart AppVersion:{0}", Main.Ins.AppInfo.AppVersion()));
    }
Ejemplo n.º 4
0
Archivo: Main.cs Proyecto: WeeirJoe/Joe
    void Create()
    {
        Log = new Log();
        LayerManager.Init();
        //不受状态机控制,仅打开和关闭的
        PersistMgr = PersistDialogMgr.Ins;
        //面板管理器.
        DialogStateManager = new MainDialogMgr();
        //顺序排队弹出框.
        PopupStateManager = new MainPopupStateManager();
        //各类游戏数据.
        GameStateMgr  = GameStateMgr.Ins;
        AppInfo       = AppInfo.Ins;
        CombatData    = CombatData.Ins;
        GameNotice    = new GameNotice();
        MeteorManager = MeteorManager.Ins;
        ScriptMng     = ScriptMng.Ins;

        ActionInterrupt = ActionInterrupt.Ins;

        BuffMng       = BuffMng.Ins;
        EventBus      = new EventBus();
        NetWorkBattle = NetWorkBattle.Ins;
        SceneMng      = SceneMng.Ins;

        //FrameSyncLocal = FrameSyncLocal.Ins;
        FrameSyncServer = FrameSyncServer.Ins;

        MeteorBehaviour = MeteorBehaviour.Ins;
        DropMng         = DropMng.Ins;
        //原版相关资源的加载器.
        MenuResLoader    = MenuResLoader.Ins;
        SkcLoader        = SkcLoader.Ins;
        BncLoader        = BncLoader.Ins;
        FMCLoader        = FMCLoader.Ins;
        GMBLoader        = GMBLoader.Ins;
        GMCLoader        = GMCLoader.Ins;
        DesLoader        = DesLoader.Ins;
        FMCPoseLoader    = FMCPoseLoader.Ins;
        SFXLoader        = SFXLoader.Ins;
        AmbLoader        = AmbLoader.Ins;
        DataMgr          = DataMgr.Ins;
        SfxMeshGenerator = SfxMeshGenerator.Ins;
        RoomMng          = RoomMng.Ins;
        SoundManager     = SoundManager.Ins;
        DlcMng           = DlcMng.Ins;
        PathMng          = PathMng.Ins;
        DownloadManager  = DownloadManager.Ins;
        DontDestroyOnLoad(gameObject);
        Log.WriteError(string.Format("GameStart AppVersion:{0}", Main.Ins.AppInfo.AppVersion()));
    }
Ejemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     //Make this class a singleton
     if (GameStateMgr._instance != null && GameStateMgr._instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         GameStateMgr._instance = this;
         DontDestroyOnLoad(this.gameObject);
         //Handle the rest of initialization of this object.
         Init();
     }
 }
Ejemplo n.º 6
0
 private RhodesGame()
 {
     battle   = new GameBattle();
     stateMgr = new GameStateMgr(battle);
 }
Ejemplo n.º 7
0
 public void SetMgr(GameStateMgr gsm)
 {
     this.m_gameStateMgr = gsm;
 }
Ejemplo n.º 8
0
 public static void Build(GameStateMgr gsm)
 {
     gsm.Register(new BootState(GameStateID.ST_BOOT));
 }