Esempio n. 1
0
 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));
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 public WeaponHandler()
 {
     collisionManager = new CollisionHandler();
     isEquiped        = false;
 }
Esempio n. 4
0
 public void UpdateCollisionBounds()
 {
     collisionManager = new ItemCollisionHandler(new Rectangle((int)position.X, (int)position.Y, (int)dimensions.X, (int)dimensions.Y));
 }
Esempio n. 5
0
 public PhysicsHandler(CollisionHandler collisionManager)
 {
     this.collisionManager = collisionManager;
 }