コード例 #1
0
ファイル: CFG.cs プロジェクト: maxims23/Buteelt
        public static CFG getInstance()
        {
            if (oCFG == null)
            {
                oCFG = new CFG();
            }

            return(oCFG);
        }
コード例 #2
0
ファイル: CFG.cs プロジェクト: jakowskidev/u2048_Jakowski
        public static CFG getInstance()
        {
            if (oCFG == null)
            {
                oCFG = new CFG();
            }

            return oCFG;
        }
コード例 #3
0
        //private long lFPSTimer = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
        //private int iNumOfFPS, nNumOfFPS;

        public Main()
        {
            InitializeComponent();

            bBackground = new Bitmap(396, 600);

            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox     = false;
            this.StartPosition   = FormStartPosition.CenterScreen;
            gGraphics            = this.CreateGraphics();
            gG = Graphics.FromImage(bBackground);

            oGame = new Game();
            CFG.getInstance();
        }
コード例 #4
0
        /* ******************************************** */

        public void UpdateGame()
        {
            oGame.Update();
            CFG.getInstance().setTime(CFG.getInstance().getCurrentTime());

            if (CFG.getInstance().getTime() - 1000 >= lFPSTimer)
            {
                lFPSTimer = CFG.getInstance().getCurrentTime();
                iNumOfFPS = nNumOfFPS;
                nNumOfFPS = 0;
            }
            else
            {
                ++nNumOfFPS;
            }
        }