public RInput() { if (REngine.Instance == null) throw new Exception("Reactor Engine must first be initialized"); else { if (RInput.Instance == null) { _instance = this; } else { return; } } }
public override void Init() { #if !XBOX this.Reactor.Init3DGame(1280, 720, false); #else this.Reactor.Init3DGame(180, 720, true); this.Reactor.SetXBox360Resolution(CONST_REACTOR_XBOX_RESOLUTION.r720P); #endif this.Reactor.SetWatermarkPosition(CONST_REACTOR_WATERMARK_POSITION.BOTTOM_RIGHT); Reactor.ShowFPS(true); Reactor.AllowEscapeQuit(true); Reactor.ShowMouse(false); //Reactor.SetDebugFile("debug.txt"); //Reactor.SetDebugMode(true); scene = new RScene(); screen = new RScreen2D(); textures = new RTextureFactory(); //lighting = new RLightingFactory(); //materials = new RMaterialFactory(); Reactor.Resized += new ViewportResized(Reactor_Resized); camera = this.Reactor.GetCamera(); camera.SetClipPlanes(1f, 180000); atmosphere = new RAtmosphere(); atmosphere.Initialize(); input = new RInput(); camera.Position = R3DVECTOR.Zero; camera.LookAt(new R3DVECTOR(0.5f,0f,0.5f)); font = screen.Create_TextureFont("Font1", "Font1"); //emitter = (RParticleEmitter)scene.CreateNode<RParticleEmitter>("myemitter"); //emitter2 = scene.CreateParticleEmitter(CONST_REACTOR_PARTICLETYPE.Billboard, "myemitter2"); landscape = (RLandscape)scene.CreateNode<RLandscape>("myland"); water = (RWater)scene.CreateNode<RWater>("mywater"); //mesh = (RActor)scene.CreateNode<RActor>("mymesh"); }