Example #1
0
 //public Rectangle Bounds { get {return new Rectangle((int)(X + 16), (int)Y, Width - 16, Height - 16);}}
 public Hero(GameManager gameManager)
     : base(gameManager)
 {
     animSprite = TextureManager.GetAnimSprite(AnimSprites.HeroRun);
     animSprite.TimePerFrame = 50;
     Width = 32;
     Height = 32;
     Friction = 0.4f;
     Speed = 2.0f;
     JumpPower = 20;
 }
Example #2
0
        protected override void LoadContent()
        {
            TextureManager.Init(new SpriteBatch(GraphicsDevice), GraphicsDevice);

            TextureManager.LoadTextures(Content);

            gameManager = new GameManager();

            hero = new Hero(gameManager);
            camera = new Camera2D(hero.Position, Settings.Resolution.Width, Settings.Resolution.Height);
             //   camera.Zoom(1.0f);
            BrickWall wall = new BrickWall(gameManager);
            BrickWall wall2 = new BrickWall(gameManager);
            wall.Position = new Vector2(2, 90);
            wall2.Position = new Vector2(40, 70);
            BrickWall wall3 = new BrickWall(gameManager);
            wall3.Position = new Vector2(60, 10);
        }
Example #3
0
 public Creature(GameManager gameManager)
     : base(gameManager)
 {
     Collision += OnCollisionWithWall;
 }
Example #4
0
 public GameObject(GameManager gameManager)
 {
     Collisions = new List<Vector2>();
     this.gameManager = gameManager;
     gameManager.Add(this);
 }
Example #5
0
 public BrickWall(GameManager gameManager)
     : base(gameManager)
 {
     Width = Settings.CellSize;
     Height = Settings.CellSize;
 }
Example #6
0
 public Wall(GameManager gameManager)
     : base(gameManager)
 {
 }