예제 #1
0
        protected override void LoadContent()
        {
            Cameras.Main.DrawSize = new Vector2(Resolution.X / 2f, Resolution.Y);

            Camera cam2 = Cameras.Create(0, 0, Graphics.WorldScale.X, Graphics.WorldScale.Y);

            cam2.DrawPosition = new Vector2(Resolution.X / 2f, 0);
            cam2.DrawSize     = new Vector2(Resolution.X / 2f, Resolution.Y);

            Content.AddImage("../../Content/GameOver.png", "GameOver");
            Content.AddImage("../../Content/Asteroid.png", "Asteroid");
            Content.AddImage("../../Content/Cursor.png", "Cursor");

            Sprites.Add("cursor", new SImage(this, 0, 0, 50, 50, "Cursor"));
            Sprites.Scale("cursor", 0.5);
            Sprites.Display("cursor", true);

            cursorSize = Sprites.GetSize("cursor");

            Content.AddSound("../../Content/pew.mp3", "Pew");

            Content.AddFont("../../Content/heav.ttf", "Heavy Data");

            test = new SharpSlugsEngine.Physics.PolygonCollider(new Vector2(0, -34.375f), new Vector2(25, 15.625f), new Vector2(0, 3.125f), new Vector2(-25, 15.625f));
        }
예제 #2
0
        protected override void LoadContent()
        {
            Content.AddImage("../../images/redTank.png", "tank1");
            Content.AddImage("../../images/blueTank.png", "tank2");
            Content.AddFont("../../images/heav.ttf", "Heavy Data");

            Sprites.Add("Player1", new PlayerTank(this, "tank1", 100, 695, true));
            Sprites.Add("Player2", new PlayerTank(this, "tank2", 1100, 695, false));
            Sprites.Add("Ground", new Rect(0, 715, 1280, 5, Color.Brown));
            Sprites.Add("Wall", new Rect(640, 500, 10, 220, Color.Brown));
            Sprites.Display("Wall", true);
            Sprites.Display("Ground", true);
        }