public Item(Vector2 spawnPosition, Texture2D texture) { position = spawnPosition; dimensions = new Vector2(64, 64); //temp (tilesize) this.texture = texture; collisionManager = new ItemCollisionHandler(new Rectangle((int)position.X, (int)position.Y, (int)dimensions.X, (int)dimensions.Y)); }
public Bullet(Vector2 _pos, float _angle, float _speed, Texture2D _texture, TileMap tileMap) { texture = _texture; position = _pos; angle = _angle; speed = _speed; collisionHandler = new BulletCollisionHandler(tileMap); direction = new Vector2((float)Math.Cos(angle), (float)Math.Sin(angle)); direction.Normalize(); }
public WeaponHandler() { collisionManager = new CollisionHandler(); isEquiped = false; }
public void UpdateCollisionBounds() { collisionManager = new ItemCollisionHandler(new Rectangle((int)position.X, (int)position.Y, (int)dimensions.X, (int)dimensions.Y)); }
public PhysicsHandler(CollisionHandler collisionManager) { this.collisionManager = collisionManager; }