From f273d8448c4c3afcfa757d3e02f53fe5ab865291 Mon Sep 17 00:00:00 2001 From: cyber-dream Date: Fri, 3 Jun 2022 12:29:12 +0300 Subject: [PATCH] create new enemy class --- ldjam50/Assets/Scripts/Enemies.meta | 8 +++++++ ldjam50/Assets/Scripts/Enemies/BaseEnemy.cs | 22 +++++++++++++++++++ .../BaseEnemy.cs.meta} | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ldjam50/Assets/Scripts/Enemies.meta create mode 100644 ldjam50/Assets/Scripts/Enemies/BaseEnemy.cs rename ldjam50/Assets/Scripts/{States/StandingState.cs.meta => Enemies/BaseEnemy.cs.meta} (83%) diff --git a/ldjam50/Assets/Scripts/Enemies.meta b/ldjam50/Assets/Scripts/Enemies.meta new file mode 100644 index 0000000..6e6adb4 --- /dev/null +++ b/ldjam50/Assets/Scripts/Enemies.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9e81f19d421a03bcb8c6cb48e91d8efd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ldjam50/Assets/Scripts/Enemies/BaseEnemy.cs b/ldjam50/Assets/Scripts/Enemies/BaseEnemy.cs new file mode 100644 index 0000000..315c95a --- /dev/null +++ b/ldjam50/Assets/Scripts/Enemies/BaseEnemy.cs @@ -0,0 +1,22 @@ +using UnityEngine; +using static BalanceScriptableObject.SpawnManagerScriptableObject; + +namespace Enemies +{ + public abstract class BaseEnemy : MonoBehaviour + { + public abstract void SetEnemyData(EnemyRow value); + + + } + + public class Enemy : BaseEnemy + { + private EnemyRow enemyData; + + public override void SetEnemyData(EnemyRow value) + { + enemyData = value; + } + } +} diff --git a/ldjam50/Assets/Scripts/States/StandingState.cs.meta b/ldjam50/Assets/Scripts/Enemies/BaseEnemy.cs.meta similarity index 83% rename from ldjam50/Assets/Scripts/States/StandingState.cs.meta rename to ldjam50/Assets/Scripts/Enemies/BaseEnemy.cs.meta index b8ef41a..9a4ce54 100644 --- a/ldjam50/Assets/Scripts/States/StandingState.cs.meta +++ b/ldjam50/Assets/Scripts/Enemies/BaseEnemy.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9289964b69be1d94b9e7a72bc9cf4a8b +guid: 5efd4ab8f726d4a9591d78c8d23c9c97 MonoImporter: externalObjects: {} serializedVersion: 2