Esempio n. 1
0
        protected override void LoadContent()
        {
            G.init(GraphicsDevice);

            reka = new DrawableObject(
                Content.Load <Texture2D>("rekakaka2"),
                new Vector2(0, 0),
                null, Color.Wheat,
                0, new Vector2(0), Vector2.One * 3f, SpriteEffects.None, 0);

            car = new MovableObj(
                Content.Load <Texture2D>("cars/car"),
                new Vector2(200, 200),
                null, Color.MediumOrchid,
                1, new Vector2(86, 64), Vector2.One * 0.5f, SpriteEffects.None, 0);

            balooba = new MovableObj(
                Content.Load <Texture2D>("cars/car"),
                new Vector2(300, 200),
                null, Color.Yellow,
                0, new Vector2(86, 64), Vector2.One * 0.5f, SpriteEffects.None, 0);

            cam = new Camera(car);
        }
Esempio n. 2
0
 public Camera(MovableObj focus)
 {
     this.focus      = focus;
     pos             = new Vector2(focus.position.X, focus.position.Y);
     Game1.updating += update;
 }