コード例 #1
0
ファイル: Character.cs プロジェクト: Stanimir-b/Youkai
 protected Character(int level, string name, int maxHealth, int maxMana, int damage, int armor, int attackSpeed, int hitRange, Location location)
 {
     this.Name = name;
     this.MaxHealth = maxHealth;
     this.MaxMana = maxMana;
     this.Health = maxHealth;
     this.Mana = maxMana;
     this.Damage = damage;
     this.Armor = armor;
     this.Level = level;
     this.AttackSpeed = attackSpeed;
     this.HitRange = hitRange;
     this.IsReadyToAttack = true;
     this.Location = location;
 }
コード例 #2
0
ファイル: Treasure.cs プロジェクト: Stanimir-b/Youkai
 public Treasure(List<Item> items, Location location)
 {
     this.Items = new List<Item>(items);
     this.Location = location;
 }
コード例 #3
0
ファイル: GamePlayScreen.cs プロジェクト: Stanimir-b/Youkai
 private void DropLoot(EnemySprite deadEnemy)
 {
     var deadEnemyLocation = new Location(deadEnemy.Position.X, deadEnemy.Position.Y);
     this.MGame.Engine.Loot.GenerateTreasureBag(deadEnemyLocation);
     if (MGame.Engine.Loot.HasLoot)
     {
         var lootSprite = new InteractionSprite(lootTexture, InteractionType.Loot);
         lootSprite.Position = new Vector2(deadEnemy.Position.X, deadEnemy.Position.Y);
         lootSprite.Treasure = MGame.Engine.Loot.Treasure;//.TreasureBags.ToArray()[droppedLoot];
         Interactables.Add(lootSprite);
         lootSprite.collisionRectangle = new Rectangle((int)lootSprite.Position.X, (int)lootSprite.Position.Y,
             lootTexture.Width / 2, lootTexture.Height);
         environmentSprites.Add(lootSprite);
         //droppedLoot += 1;
     }
 }