[ create a new paste ] login | about

Link: http://codepad.org/qoUJ2ibh    [ raw code | fork ]

endless - C++, pasted on May 28:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SFML;
using SFML.Graphics;
using SFML.Window;

namespace Gemuzzle
{
    public enum eGamestates
    {
        INTRO,
        MAINMENU,
        INGAME,
        HIGHSCORE,
        OUTRO,
        END
    };
    class Framework
    {
        public static Font mFont_Text = new Font("data\\calibri.ttf");
        public static Font mFont_Number = new Font("data\\digital.ttf");

        public static eGamestates mGamestate;
        public static Styles mStyle;
        public static string mWindowTitle;
        public static VideoMode mVideomode;
        public static RenderWindow mWindow;
        public static bool mStatus;
        

        public static void Init()
        {
            mGamestate = eGamestates.INTRO;
            mVideomode = new VideoMode(350, 600, 16);
            mWindowTitle = "Gemuzzle";
            mStyle = Styles.Close;
            mWindow = new RenderWindow(mVideomode, mWindowTitle, mStyle);
            mStatus = true;
            mWindow.Closed += new EventHandler(OnClose);
        }
        public static void Destroy()
        {
            mWindow.Close();
        }
        //public static void mGamestate = eGamestates Value)
        //{
        //    mGamestate = Value;
        //}
        //public static eGamestates mGamestate
        //{
        //    return mGamestate;
        //}
        //public static RenderWindow mWindow
        //{
        //    return mWindow;
        //}
        //public static void setStatus(bool Value)
        //{
        //    mStatus = Value;
        //}
        //public static bool getStatus()
        //{
        //    return mStatus;
        //}
        static void OnClose(object sender, EventArgs e)
        {
            mStatus = false;
            mGamestate = eGamestates.END;
        }
    }
}


Create a new paste based on this one


Comments: