コード例 #1
0
        protected override void Initialize()
        {
            ///GameDebug.Log("Hello World");

            //  level = new Level();
            Level.Init();
            camera = new Camera2D();
            DebugCam = new PhysicsDebugCam();
            testText = new GUI(string.Empty);
            testText.Text(some_text);

            PhysicLoad();
            Level.LoadLevel(levelName);

            base.Initialize();
        }
コード例 #2
0
        static Menu()
        {

            title = Game1.content.Load<Texture2D>("Sprites/title");
            background = Game1.content.Load<Texture2D>("Sprites/gfxlib/area04_bkg0");
            copyright = new GUI("A Game by Memorix101");
            copyright.Load("Fonts\\Pixel");
            copyright.Position = new Vector2(Screen.width / 2 - copyright.Size.X / 2, Screen.height - copyright.Size.Y);
            copyright.Color = Color.White;

            MenuItems = new List<GUI>();

            MenuItems.Add(new GUI("Play"));
            //  MenuItems.Add(new GUI("World Map"));
            MenuItems.Add(new GUI("Quit"));

            for (int i = 0; i < MenuItems.Count; i++)
            {
                MenuItems[i].Load("Fonts\\70sPixel_20");
                MenuItems[i].Position = new Vector2(Screen.width / 2 - MenuItems[i].Size.X / 2, 50 * i + Screen.height / 2 + 50);
            }
        }