Exemplo n.º 1
0
        protected override void Initialize()
        {
            //init services
            this.Services.AddService <Random>(new Random());
            this.Services.AddService <IRandom>(new ParticleRandom(this.Services.GetService <Random>()));
            this.Services.AddService <IMEHandler>(this.imeHelper);

            ServiceManager.Instance.AddService <IMEHandler>(this.imeHelper);

            //init components
            this.renderEnv = new RenderEnv(this, this.graphics);
            this.batcher   = new MeshBatcher(this.GraphicsDevice)
            {
                CullingEnabled = true
            };
            this.resLoader = new ResourceLoader(this.Services);
            this.ui        = new MapRenderUIRoot();
            this.BindingUIInput();
            this.tooltip = new Tooltip2(this.Content);
            this.tooltip.StringLinker = this.StringLinker;
            this.cm = new CoroutineManager(this);
            this.cm.StartCoroutine(OnStart()); //entry
            this.Components.Add(cm);
            this.fpsCounter = new FpsCounter(this)
            {
                UseStopwatch = true
            };
            this.Components.Add(fpsCounter);

            this.ApplySetting();
            SwitchResolution(Resolution.Window_800_600);
            base.Initialize();
        }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            this.renderEnv = new RenderEnv(this, this.graphics);
            this.batcher   = new MeshBatcher(this.GraphicsDevice);
            this.resLoader = new ResourceLoader(this.Services);
            this.ui        = new MapRenderUIRoot();
            this.BindingUIInput();
            this.tooltip = new Tooltip2(this.GraphicsDevice);
            this.tooltip.StringLinker = this.StringLinker;
            this.cm = new CoroutineManager(this);
            this.cm.StartCoroutine(OnStart()); //entry
            this.Components.Add(cm);
            this.fpsCounter = new FpsCounter(this)
            {
                UseStopwatch = true
            };
            this.Components.Add(fpsCounter);

            this.ApplySetting();
            SwitchResolution(Resolution.Window_800_600);
            base.Initialize();
        }