diff --git a/Configs.meta b/Configs.meta new file mode 100644 index 0000000..67fca1f --- /dev/null +++ b/Configs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 53030be49a9c3984fbb21dee5c9e1f8d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Configs/SoPowerConfig.cs b/Configs/SoPowerConfig.cs new file mode 100644 index 0000000..ecf7efe --- /dev/null +++ b/Configs/SoPowerConfig.cs @@ -0,0 +1,13 @@ +using UnityEngine; + +namespace GameDev.CoreSystems +{ + [CreateAssetMenu(fileName = "newPowerConfiguration", menuName = "Configuration/Power")] + public class SoPowerConfig : ScriptableObject + { + public bool isGenerator; + public bool isConsumer; + public int maxPower; + public SoPowerSystemRuntimeSet _runtimeSet; + } +} \ No newline at end of file diff --git a/Configs/SoPowerConfig.cs.meta b/Configs/SoPowerConfig.cs.meta new file mode 100644 index 0000000..ceb8c6e --- /dev/null +++ b/Configs/SoPowerConfig.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 87159085b5778b14482ec38673729d95 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Configs/SoTargeterConfig.cs b/Configs/SoTargeterConfig.cs new file mode 100644 index 0000000..1f6b9c5 --- /dev/null +++ b/Configs/SoTargeterConfig.cs @@ -0,0 +1,21 @@ +using UnityEngine; +using UnityEngine.Serialization; + +namespace GameDev.CoreSystems +{ + [CreateAssetMenu(fileName = "newTargeterConfiguration", menuName = "Configuration/Targeter")] + public class SoTargeterConfig : ScriptableObject + { + [FormerlySerializedAs("_range")] + public float _maxRange; + public float _minRange; + public TargetStrategy _selectedTargetStrategy; + public SoTargetableRuntimeSet _activeEntities; + + public enum TargetStrategy + { + LowestRange, + LowestHealth + }; + } +} \ No newline at end of file diff --git a/Configs/SoTargeterConfig.cs.meta b/Configs/SoTargeterConfig.cs.meta new file mode 100644 index 0000000..5c2f0bb --- /dev/null +++ b/Configs/SoTargeterConfig.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 02781660543c12d4ebddaf334eb0d730 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Configs/SoWeaponConfig.cs b/Configs/SoWeaponConfig.cs new file mode 100644 index 0000000..2b656d3 --- /dev/null +++ b/Configs/SoWeaponConfig.cs @@ -0,0 +1,23 @@ +using GameDev.CoreSystems; +using UnityEngine; + +namespace AsteroidGame.ScriptableObjects +{ + public class SoWeaponConfig : ScriptableObject, IWeapon + { + [SerializeField] private float _fireRate; + [SerializeField] private float _damage; + + public float FireRate + { + get => _fireRate; + set => _fireRate = value; + } + + public float Damage + { + get => _damage; + set => _damage = value; + } + } +} \ No newline at end of file diff --git a/Configs/SoWeaponConfig.cs.meta b/Configs/SoWeaponConfig.cs.meta new file mode 100644 index 0000000..f7217fb --- /dev/null +++ b/Configs/SoWeaponConfig.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 19bf3f6dd184a48499aff1db728edfcd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Interfaces/IPowerSystem.cs b/Interfaces/IPowerSystem.cs index 0c058cb..87c50f0 100644 --- a/Interfaces/IPowerSystem.cs +++ b/Interfaces/IPowerSystem.cs @@ -3,15 +3,17 @@ namespace GameDev.CoreSystems public interface IPowerSystem { public bool IsGenerator { get; } - + public bool IsConsumer { get; } - + public void SetMaxPower(int newValue); + public void SetConfig(SoPowerConfig config); + public int GetMaxPower(); public int GetCurrentPower(); public float GetPowerFactor(); } -} +} \ No newline at end of file diff --git a/Interfaces/ITargetable.cs b/Interfaces/ITargetable.cs index fbddbc7..15b28fa 100644 --- a/Interfaces/ITargetable.cs +++ b/Interfaces/ITargetable.cs @@ -5,7 +5,7 @@ namespace GameDev.CoreSystems public interface ITargetable { public Vector3 GetCenterPosition(); - + public Vector3 GetBasePosition(); } -} +} \ No newline at end of file diff --git a/Interfaces/SoBuildableRuntimeSet.cs b/Interfaces/SoBuildableRuntimeSet.cs new file mode 100644 index 0000000..3373d80 --- /dev/null +++ b/Interfaces/SoBuildableRuntimeSet.cs @@ -0,0 +1,10 @@ +using ScriptableObjectArchitecture; +using UnityEngine; + +namespace GameDev.CoreSystems +{ + [CreateAssetMenu(fileName = "newBuildableRuntimeSet", menuName = "RuntimeSet/IBuildable")] + public class SoBuildableRuntimeSet : Collection + { + } +} \ No newline at end of file diff --git a/Interfaces/SoBuildableRuntimeSet.cs.meta b/Interfaces/SoBuildableRuntimeSet.cs.meta new file mode 100644 index 0000000..3a35b41 --- /dev/null +++ b/Interfaces/SoBuildableRuntimeSet.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b73ccf581b4b8ca4fa9c4e0a61cdd6be +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Interfaces/SoDamageableRuntimeSet.cs b/Interfaces/SoDamageableRuntimeSet.cs index f971e43..f838b0f 100644 --- a/Interfaces/SoDamageableRuntimeSet.cs +++ b/Interfaces/SoDamageableRuntimeSet.cs @@ -1,11 +1,10 @@ - using ScriptableObjectArchitecture; using UnityEngine; namespace GameDev.CoreSystems { - [CreateAssetMenu(fileName = "newDamageableRuntimeSet", menuName = "RuntimeSet/Damageable")] - public class SoDamageableRuntimeSet : Collection + [CreateAssetMenu(fileName = "newDamageableRuntimeSet", menuName = "RuntimeSet/IDamageable")] + public class SoDamageableRuntimeSet : Collection { } } \ No newline at end of file diff --git a/Interfaces/SoPowerSystemRuntimeSet.cs b/Interfaces/SoPowerSystemRuntimeSet.cs new file mode 100644 index 0000000..f1370d2 --- /dev/null +++ b/Interfaces/SoPowerSystemRuntimeSet.cs @@ -0,0 +1,10 @@ +using ScriptableObjectArchitecture; +using UnityEngine; + +namespace GameDev.CoreSystems +{ + [CreateAssetMenu(fileName = "newPowerSystemRuntimeSet", menuName = "RuntimeSet/IPowerSystem")] + public class SoPowerSystemRuntimeSet : Collection + { + } +} \ No newline at end of file diff --git a/Interfaces/SoPowerSystemRuntimeSet.cs.meta b/Interfaces/SoPowerSystemRuntimeSet.cs.meta new file mode 100644 index 0000000..8456bf5 --- /dev/null +++ b/Interfaces/SoPowerSystemRuntimeSet.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1e1a04865d154864c97344bae176e489 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Interfaces/SoWeaponRuntimeSet.cs b/Interfaces/SoWeaponRuntimeSet.cs new file mode 100644 index 0000000..24e293b --- /dev/null +++ b/Interfaces/SoWeaponRuntimeSet.cs @@ -0,0 +1,10 @@ +using ScriptableObjectArchitecture; +using UnityEngine; + +namespace GameDev.CoreSystems +{ + [CreateAssetMenu(fileName = "newWeaponRuntimeSet", menuName = "RuntimeSet/IWeapon")] + public class SoWeaponRuntimeSet : Collection + { + } +} \ No newline at end of file diff --git a/Interfaces/SoWeaponRuntimeSet.cs.meta b/Interfaces/SoWeaponRuntimeSet.cs.meta new file mode 100644 index 0000000..d53f2fb --- /dev/null +++ b/Interfaces/SoWeaponRuntimeSet.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 99e8943f854c5fd49be2e7ea084b19a9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: