From 9e00e4d05d8dc1dac33fe35dd36a8fd8489b9833 Mon Sep 17 00:00:00 2001 From: Kaktus200020 Date: Sat, 17 Aug 2024 19:36:30 +0300 Subject: [PATCH] LootData --- .../GameObjects/Entities/LivingEntities/Player/LootData.cs | 7 ++++--- .../GameObjects/Entities/LivingEntities/Player/Player.cs | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ZoFo/GameCore/GameObjects/Entities/LivingEntities/Player/LootData.cs b/ZoFo/GameCore/GameObjects/Entities/LivingEntities/Player/LootData.cs index 5336e7b..2d86531 100644 --- a/ZoFo/GameCore/GameObjects/Entities/LivingEntities/Player/LootData.cs +++ b/ZoFo/GameCore/GameObjects/Entities/LivingEntities/Player/LootData.cs @@ -6,12 +6,13 @@ using System.Threading.Tasks; namespace ZoFo.GameCore.GameObjects.Entities.LivingEntities.Player { - internal class LootData + class LootData { public Dictionary loots; - public void AddLoot(object lootObject, int quantity) - { + public void AddLoot(string lootName, int quantity) + { + loots.Add(lootName, quantity); } } } diff --git a/ZoFo/GameCore/GameObjects/Entities/LivingEntities/Player/Player.cs b/ZoFo/GameCore/GameObjects/Entities/LivingEntities/Player/Player.cs index 026a746..3078de9 100644 --- a/ZoFo/GameCore/GameObjects/Entities/LivingEntities/Player/Player.cs +++ b/ZoFo/GameCore/GameObjects/Entities/LivingEntities/Player/Player.cs @@ -20,6 +20,7 @@ public class Player : LivingEntity public bool IsTryingToShoot { get; set; } private float speed; private int health; + private LootData lootData; public override GraphicsComponent graphicsComponent { get; } = new GraphicsComponent(new List { "player_running_top_rotate" }, "player_running_top_rotate"); public Player(Vector2 position) : base(position) {