コード例 #1
0
ファイル: GameObject.cs プロジェクト: ripark/Kinetic-Camp
 public GameObject(Texture2D texture, Projectile projectile, Vector2 location, Direction direction, Rectangle windowBounds, bool liftable)
 {
     this.texture = texture;
     this.projectile = projectile;
     this.location = location;
     this.direction = direction;
     this.windowBounds = windowBounds;
     this.liftable = liftable;
     this.selected = false;
     bounds = new Rectangle((int) location.X, (int) location.Y, texture.Width, texture.Height);
     lastFired = -1;
 }
コード例 #2
0
ファイル: Entity.cs プロジェクト: ripark/Kinetic-Camp
 public Entity(Texture2D texture, Projectile projectile, Vector2 location, Direction direction, Rectangle bounds, Rectangle windowBounds, int health, int speed)
 {
     this.texture = texture;
     this.projectile = projectile;
     this.location = location;
     this.direction = direction;
     this.bounds = bounds;
     this.windowBounds = windowBounds;
     this.health = health;
     this.speed = speed;
     moved = new Vector2(0f, 0f);
     lastFired = -1;
 }
コード例 #3
0
ファイル: Entity.cs プロジェクト: ripark/Kinetic-Camp
 public Entity(Texture2D texture, Projectile projectile, Vector2 location, Direction direction, Rectangle windowBounds, int health, int speed)
     : this(texture, projectile, location, direction, new Rectangle((int) location.X, (int) location.Y, texture.Width, texture.Height), windowBounds, health, speed)
 {
 }
コード例 #4
0
ファイル: Entity.cs プロジェクト: ripark/Kinetic-Camp
 /*
  * Sets the entity's projectile to the given projectile
  */
 public void setProjectile(Projectile projectile)
 {
     this.projectile = projectile;
 }
コード例 #5
0
ファイル: Level.cs プロジェクト: ripark/Kinetic-Camp
 /*
  * Adds an active projectile to the level
  */
 public void addProjectile(Projectile projectile)
 {
     projectiles.Add(projectile);
 }
コード例 #6
0
ファイル: GameObject.cs プロジェクト: ripark/Kinetic-Camp
 public GameObject(Texture2D texture, Projectile projectile, Vector2 location, Rectangle windowBounds, bool liftable)
     : this(texture, projectile, location, Direction.NONE, windowBounds, liftable)
 {
 }