public Form1() { InitializeComponent(); m_OpenGLControl.InitializeContexts(); Setup2DGraphics(ClientSize.Width, ClientSize.Height); m_TextureManager.LoadTexture("face", "face.tif"); m_TextureManager.LoadTexture("face_alpha", "face_alpha.tif"); if (m_FullScreen) { FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized; } else { ClientSize = new Size(1280, 720); } // Add all states to be used m_System.AddState("splash", new SplashScreenState(m_System)); m_System.AddState("title_menu", new TitleMenuState()); m_System.AddState("sprite_test", new DrawSpriteState(m_TextureManager)); m_System.AddState("new_sprite_test", new TestSpriteClassState(m_TextureManager)); // Set the start state m_System.ChangeState("new_sprite_test"); m_FastLoop = new FastLoop(GameLoop); }
public Form1() { //add all the states that will be used _system.AddState("splash", new SplashcreenState(_system)); _system.AddState("title_menu", new TitleMenuState()); _system.AddState("sprite_test", new DrawSpriteState()); //select the start state //_system.ChangeState("splash"); _system.ChangeState("title_menu"); //_system.ChangeState("sprite_test"); _fastLoop = new FastLoop(GameLoop); InitializeComponent(); _openGLControl.InitializeContexts(); if (_fullscreen) { FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized; } else { ClientSize = new Size(1280, 720); } Setup2DGraphics(ClientSize.Width, ClientSize.Height); }
public Form1() { _system.AddState("Splash", new SplashScreenState(_system)); _system.AddState("title_menu", new TitleMenuState()); _system.AddState("sprite_test", new DrawSpriteState(_textureManger)); _system.ChangeState("sprite_test"); // Init DevIl Il.ilInit(); Ilu.iluInit(); Ilut.ilutInit(); Ilut.ilutRenderer(Ilut.ILUT_OPENGL); InitializeComponent(); _openGLControl.InitializeContexts(); if (_fullscreen) { FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized; } else { ClientSize = new Size(800, 600); } Setup2DGraphics(ClientSize.Width, ClientSize.Height); _fastloop = new FastLoop(GameLoop); _textureManger.LoadTexture("flower", "flower.jpg"); }
public void TestAddedStateExists() { StateSystem stateSystem = new StateSystem(); stateSystem.AddState("splash", new SplashScreenState(stateSystem)); // Does the added function now exist? Assert.IsTrue(stateSystem.Exists("splash")); }
public Form1() { InitializeComponent(); _openGlControl.InitializeContexts(); //Init DevIl Il.ilInit(); Ilu.iluInit(); Ilut.ilutInit(); Ilut.ilutRenderer(Ilut.ILUT_OPENGL); //Load textures _textureManager.LoadTexture("1", "Image/1.tif"); _textureManager.LoadTexture("face", "Image/face.tif"); _textureManager.LoadTexture("face_alpha", "Image/face_alpha.tif"); _textureManager.LoadTexture("font", "Image/font.tga"); //states _system.AddState("splash", new SplashScreenState(_system)); _system.AddState("title_menu", new TitleMenuState(_system)); _system.AddState("sprite_test", new DrawSpriteState(_textureManager)); _system.AddState("TestRender", new TestSpriteClassState(_textureManager)); _system.AddState("WaveformGraphState", new WaveformGraphState( )); _system.AddState("TextTest", new TextTestState(_textureManager)); _system.AddState("TextRender", new TextRenderState(_textureManager)); _system.AddState("SpecialEffect", new SpecialEffectState(_textureManager)); _system.AddState("Circle", new CircleIntersectionState()); _system.ChangeState("Circle"); if (_fullScreen) { FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized; } else { ClientSize = new Size(1280, 720); } Setup2DGraphics(ClientSize.Width, ClientSize.Height); _fastLoop = new FastLoop(GameLoop); }
private void CreateGameStates() { _system.AddState("splash", new SplashcreenState(_system)); _system.AddState("title_menu", new TitleMenuState()); _system.AddState("sprite_test", new DrawSpriteState()); }