From f23bd9fe9f05513172102e120987ca924aa37027 Mon Sep 17 00:00:00 2001 From: Lev Date: Thu, 15 Aug 2024 17:24:25 +0300 Subject: [PATCH] add register entity --- ZoFo/GameCore/GameObjects/{ => AttackEntities}/Bullet.cs | 0 ZoFo/GameCore/GameObjects/{ => AttackEntities}/GunAttack.cs | 0 ZoFo/GameCore/GameObjects/{ => AttackEntities}/HandAttack.cs | 0 ZoFo/GameCore/GameObjects/{ => AttackEntities}/Rock.cs | 0 .../GameCore/GameObjects/{ => AttackEntities}/SwordAttack.cs | 0 ZoFo/GameCore/GameObjects/{ => BaseClasses}/Collectable.cs | 0 ZoFo/GameCore/GameObjects/{ => BaseClasses}/Entity.cs | 0 ZoFo/GameCore/GameObjects/{ => BaseClasses}/GameObject.cs | 0 ZoFo/GameCore/GameObjects/{ => BaseClasses}/LivingEntity.cs | 0 .../GameCore/GameObjects/{ => Player}/IPlayerWeaponAttack.cs | 0 ZoFo/GameCore/GameObjects/{ => Player}/LootData.cs | 0 ZoFo/GameCore/GameObjects/{ => Player}/Player.cs | 0 ZoFo/GameCore/GameObjects/{ => Tiles}/StopObject.cs | 0 ZoFo/GameCore/GameObjects/{ => Tiles}/Tile.cs | 0 ZoFo/GameCore/Server.cs | 5 +++++ 15 files changed, 5 insertions(+) rename ZoFo/GameCore/GameObjects/{ => AttackEntities}/Bullet.cs (100%) rename ZoFo/GameCore/GameObjects/{ => AttackEntities}/GunAttack.cs (100%) rename ZoFo/GameCore/GameObjects/{ => AttackEntities}/HandAttack.cs (100%) rename ZoFo/GameCore/GameObjects/{ => AttackEntities}/Rock.cs (100%) rename ZoFo/GameCore/GameObjects/{ => AttackEntities}/SwordAttack.cs (100%) rename ZoFo/GameCore/GameObjects/{ => BaseClasses}/Collectable.cs (100%) rename ZoFo/GameCore/GameObjects/{ => BaseClasses}/Entity.cs (100%) rename ZoFo/GameCore/GameObjects/{ => BaseClasses}/GameObject.cs (100%) rename ZoFo/GameCore/GameObjects/{ => BaseClasses}/LivingEntity.cs (100%) rename ZoFo/GameCore/GameObjects/{ => Player}/IPlayerWeaponAttack.cs (100%) rename ZoFo/GameCore/GameObjects/{ => Player}/LootData.cs (100%) rename ZoFo/GameCore/GameObjects/{ => Player}/Player.cs (100%) rename ZoFo/GameCore/GameObjects/{ => Tiles}/StopObject.cs (100%) rename ZoFo/GameCore/GameObjects/{ => Tiles}/Tile.cs (100%) diff --git a/ZoFo/GameCore/GameObjects/Bullet.cs b/ZoFo/GameCore/GameObjects/AttackEntities/Bullet.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/Bullet.cs rename to ZoFo/GameCore/GameObjects/AttackEntities/Bullet.cs diff --git a/ZoFo/GameCore/GameObjects/GunAttack.cs b/ZoFo/GameCore/GameObjects/AttackEntities/GunAttack.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/GunAttack.cs rename to ZoFo/GameCore/GameObjects/AttackEntities/GunAttack.cs diff --git a/ZoFo/GameCore/GameObjects/HandAttack.cs b/ZoFo/GameCore/GameObjects/AttackEntities/HandAttack.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/HandAttack.cs rename to ZoFo/GameCore/GameObjects/AttackEntities/HandAttack.cs diff --git a/ZoFo/GameCore/GameObjects/Rock.cs b/ZoFo/GameCore/GameObjects/AttackEntities/Rock.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/Rock.cs rename to ZoFo/GameCore/GameObjects/AttackEntities/Rock.cs diff --git a/ZoFo/GameCore/GameObjects/SwordAttack.cs b/ZoFo/GameCore/GameObjects/AttackEntities/SwordAttack.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/SwordAttack.cs rename to ZoFo/GameCore/GameObjects/AttackEntities/SwordAttack.cs diff --git a/ZoFo/GameCore/GameObjects/Collectable.cs b/ZoFo/GameCore/GameObjects/BaseClasses/Collectable.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/Collectable.cs rename to ZoFo/GameCore/GameObjects/BaseClasses/Collectable.cs diff --git a/ZoFo/GameCore/GameObjects/Entity.cs b/ZoFo/GameCore/GameObjects/BaseClasses/Entity.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/Entity.cs rename to ZoFo/GameCore/GameObjects/BaseClasses/Entity.cs diff --git a/ZoFo/GameCore/GameObjects/GameObject.cs b/ZoFo/GameCore/GameObjects/BaseClasses/GameObject.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/GameObject.cs rename to ZoFo/GameCore/GameObjects/BaseClasses/GameObject.cs diff --git a/ZoFo/GameCore/GameObjects/LivingEntity.cs b/ZoFo/GameCore/GameObjects/BaseClasses/LivingEntity.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/LivingEntity.cs rename to ZoFo/GameCore/GameObjects/BaseClasses/LivingEntity.cs diff --git a/ZoFo/GameCore/GameObjects/IPlayerWeaponAttack.cs b/ZoFo/GameCore/GameObjects/Player/IPlayerWeaponAttack.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/IPlayerWeaponAttack.cs rename to ZoFo/GameCore/GameObjects/Player/IPlayerWeaponAttack.cs diff --git a/ZoFo/GameCore/GameObjects/LootData.cs b/ZoFo/GameCore/GameObjects/Player/LootData.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/LootData.cs rename to ZoFo/GameCore/GameObjects/Player/LootData.cs diff --git a/ZoFo/GameCore/GameObjects/Player.cs b/ZoFo/GameCore/GameObjects/Player/Player.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/Player.cs rename to ZoFo/GameCore/GameObjects/Player/Player.cs diff --git a/ZoFo/GameCore/GameObjects/StopObject.cs b/ZoFo/GameCore/GameObjects/Tiles/StopObject.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/StopObject.cs rename to ZoFo/GameCore/GameObjects/Tiles/StopObject.cs diff --git a/ZoFo/GameCore/GameObjects/Tile.cs b/ZoFo/GameCore/GameObjects/Tiles/Tile.cs similarity index 100% rename from ZoFo/GameCore/GameObjects/Tile.cs rename to ZoFo/GameCore/GameObjects/Tiles/Tile.cs diff --git a/ZoFo/GameCore/Server.cs b/ZoFo/GameCore/Server.cs index 7bf421a..8be4c50 100644 --- a/ZoFo/GameCore/Server.cs +++ b/ZoFo/GameCore/Server.cs @@ -40,5 +40,10 @@ namespace ZoFo.GameCore internal void Update(GameTime gameTime) { } + + public void RegisterEntity(GameObject gameObject) + { + gameObjects.Add(gameObject); + } } }