예제 #1
0
파일: MonoNet.cs 프로젝트: RhythNS/MonoNet
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            new EventHandlerDictionary();
            new Log(Log.Level.PrintMessages, Log.Level.PrintMessagesAndStackTrace, Log.Level.PrintMessagesAndStackTrace);

            manager = new GameSystemManager();
            manager.Add(new Time(), new Input(), new Physic());

            ScreenManager.Initialize();
        }
예제 #2
0
        protected override void Initialize()
        {
            new Log(Log.Level.PrintMessages, Log.Level.PrintMessagesAndStackTrace, Log.Level.PrintMessagesAndStackTrace);

            manager = new GameSystemManager();
            manager.Add(new Time(), new Input(), new Physic());

            stage = new Stage(5, new Pool<Actor>(50, 10));

            // various testing components
            stage.CreateActor(0).AddComponent<InputTesterComponent>();
            stage.CreateActor(0).AddComponent<CoroutineTest>();

            camera = new Camera(GraphicsDevice.Viewport);

            base.Initialize();
        }
예제 #3
0
파일: TestGame.cs 프로젝트: RhythNS/MonoNet
        protected override void Initialize()
        {
            new EventHandlerDictionary();
            new Log(Log.Level.PrintMessages, Log.Level.PrintMessagesAndStackTrace, Log.Level.PrintMessagesAndStackTrace);

            manager = new GameSystemManager();
            manager.Add(new Time(), new Input(), new Physic());

            stage = new Stage(LayersForStage, new Pool <Actor>(50, 10));

            camera = new Camera(GraphicsDevice.Viewport);

            if (CreateCameraTestComponent == true)
            {
                stage.CreateActor(0).AddComponent <CameraTestComponent>().camera = camera;
            }

            base.Initialize();
        }