/// <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(); processManager = new gxtProcessManager(); processManager.Initialize(); DummyProcess proc0 = new DummyProcess(TimeSpan.FromSeconds(3.0), gxtVerbosityLevel.SUCCESS, "green message for three seconds"); DummyProcess proc1 = new DummyProcess(TimeSpan.FromSeconds(3.0), gxtVerbosityLevel.CRITICAL, "red message for three seconds"); DummyProcess proc2 = new DummyProcess(TimeSpan.FromSeconds(3.0), gxtVerbosityLevel.INFORMATIONAL, "white message for three seconds"); proc0.SetNextProcess(proc1).SetNextProcess(proc2); processManager.Add(proc0); }
// some log method here that checks the state of everything // see if major components are null and initialized // maybe some other things can be printed /// <summary> /// Initializes the world and all of its components /// Should be called first (before load) /// </summary> public virtual void Initialize(bool initEnabled = true, string name = "GXT World") { gxtDebug.Assert(!IsInitialized(), "World has already been initialized!"); enabled = initEnabled; worldName = name; gameSpeed = 1.0f; // init lists actors = new List<gxtIActor>(); animations = new List<gxtAnimation>(); controllers = new List<gxtIController>(); // construct components sceneGraph = new gxtSceneGraph(); processManager = new gxtProcessManager(); physicsWorld = new gxtPhysicsWorld(); pathGraph = new gxtPathGraph(); audioScene = new gxtAudioScene(); // init components sceneGraph.Initialize(); camera = new gxtCamera(Vector2.Zero, 0, 0, true); //gxtDisplayManager.Singleton.RegisterCamera(camera); processManager.Initialize(); physicsWorld.Initialize(); //audioScene.Initialize("soundBankFile", "waveBankFile"); // fire on init event if (OnWorldInit != null) OnWorldInit(this); }