Exemplo n.º 1
0
 /// <summary>
 /// Constructs a new projectile.
 /// </summary>
 /// <param name="world">The world that this projectile belongs to.</param>
 /// <param name="owner">The ship that fired this projectile, if any.</param>
 /// <param name="direction">The initial direction for this projectile.</param>
 public Projectile(World world, Gameplay.NanoBot owner, Vector2 direction)
     : base(world)
 {
     this.owner    = owner;
     this.position = owner.Position;
     this.velocity = direction;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructs a new weapon.
 /// </summary>
 /// <param name="owner">The ship that owns this weapon.</param>
 public Weapon(Gameplay.NanoBot owner)
 {
     if (owner == null)
     {
         throw new ArgumentNullException("owner");
     }
     this.owner = owner;
 }