//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; }
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); }
public Creature(GameManager gameManager) : base(gameManager) { Collision += OnCollisionWithWall; }
public GameObject(GameManager gameManager) { Collisions = new List<Vector2>(); this.gameManager = gameManager; gameManager.Add(this); }
public BrickWall(GameManager gameManager) : base(gameManager) { Width = Settings.CellSize; Height = Settings.CellSize; }
public Wall(GameManager gameManager) : base(gameManager) { }