コード例 #1
0
ファイル: Enemy.cs プロジェクト: jrusev/Games
 /// <summary>
 /// Initializes a new instance for the Enemy class
 /// </summary>
 /// <param name="x">Coordinate X</param>
 /// <param name="y">Coordinate Y</param>
 /// <param name="image">Image</param>
 protected Enemy(int x, int y, Bitmap image, ItemDeliveryCompany company, int gunDamage)
     : base(x, y, image)
 {
     this.WalkDirection = RandomGenerator.Direction();
     this.Inventory = company.DeliverInventory();
     this.Bullets = IniitialBullets;
     this.HasVest = true;
     this.GunDamage = gunDamage;
     this.LoadTextures();
 }
コード例 #2
0
ファイル: Chest.cs プロジェクト: jrusev/Games
 /// <summary>
 /// Initializes a new instance of the Chest class
 /// </summary>
 /// <param name="x">Coordinate X</param>
 /// <param name="y">Coordinate Y</param>
 /// <param name="image">Image of the chest</param>
 /// <param name="company">Delivery company for the inventory</param>
 public Chest(int x, int y, Image image, ItemDeliveryCompany company)
     : base(x, y, image)
 {
     this.Inventory = company.DeliverInventory();
     this.openCloseAnimation = new AnimTexture(Resources.Chest_Close_Open, 0.2f, true, 48);
 }