public Form1()
        {
            _fastLoop = new FastLoop(GameLoop);

            InitializeComponent();
            _openGLControl.InitializeContexts();

            // Initialize DevIL
            Il.ilInit();
            Ilu.iluInit();
            Ilut.ilutInit();
            Ilut.ilutRenderer(Ilut.ILUT_OPENGL);

            // Load textures
            _textureManager.LoadTexture("font", "font.tga");
            _textureManager.LoadTexture("face", "face_alpha.tif");

            if (_fullscreen)
            {
                FormBorderStyle = FormBorderStyle.None;
                WindowState     = FormWindowState.Maximized;
            }
            else
            {
                ClientSize = new Size(1280, 720);
            }

            // Initialize states
            _system.AddState("graph_state", new WaveformGraphState());
            _system.AddState("special_effect_state", new SpecialEffectState(_textureManager));
            _system.AddState("swirl_effect_state", new SwirlEffectState(_textureManager));
            _system.AddState("bounce_state", new CharacterBounceState(_textureManager));
            _system.AddState("circle_intersect_state", new CircleIntersectionState(_input));
            _system.AddState("rectangle_intersect_state", new RectangleIntersectionState(_input));
            _system.AddState("sprite_tween_state", new SpriteTweenState(_textureManager));
            _system.ChangeState("sprite_tween_state");
        }
Exemplo n.º 2
0
        public Form1()
        {
            _fastLoop = new FastLoop(GameLoop);

            InitializeComponent();
            _openGLControl.InitializeContexts();

            // Initialize DevIL
            Il.ilInit();
            Ilu.iluInit();
            Ilut.ilutInit();
            Ilut.ilutRenderer(Ilut.ILUT_OPENGL);

            // Load textures
            _textureManager.LoadTexture("font", "font.tga");
            _textureManager.LoadTexture("face", "face_alpha.tif");

            if (_fullscreen)
            {
                FormBorderStyle = FormBorderStyle.None;
                WindowState = FormWindowState.Maximized;
            }
            else
            {
                ClientSize = new Size(1280, 720);
            }

            // Initialize states
            _system.AddState("graph_state", new WaveformGraphState());
            _system.AddState("special_effect_state", new SpecialEffectState(_textureManager));
            _system.AddState("swirl_effect_state", new SwirlEffectState(_textureManager));
            _system.AddState("bounce_state", new CharacterBounceState(_textureManager));
            _system.AddState("circle_intersect_state", new CircleIntersectionState(_input));
            _system.AddState("rectangle_intersect_state", new RectangleIntersectionState(_input));
            _system.AddState("sprite_tween_state", new SpriteTweenState(_textureManager));
            _system.ChangeState("sprite_tween_state");
        }