diff --git a/.gitignore b/.gitignore
index 37d59e5..798c888 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,4 +71,6 @@ crashlytics-build.properties
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
-.vscode
\ No newline at end of file
+.vscode/
+
+.idea/
\ No newline at end of file
diff --git a/.idea/.idea.spellcasters/.idea/workspace.xml b/.idea/.idea.spellcasters/.idea/workspace.xml
new file mode 100644
index 0000000..fb8f2c3
--- /dev/null
+++ b/.idea/.idea.spellcasters/.idea/workspace.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1656954059094
+
+
+ 1656954059094
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index e232cd6..0000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "files.exclude":
- {
- "**/.DS_Store":true,
- "**/.git":true,
- "**/.gitmodules":true,
- "**/*.booproj":true,
- "**/*.pidb":true,
- "**/*.suo":true,
- "**/*.user":true,
- "**/*.userprefs":true,
- "**/*.unityproj":true,
- "**/*.dll":true,
- "**/*.exe":true,
- "**/*.pdf":true,
- "**/*.mid":true,
- "**/*.midi":true,
- "**/*.wav":true,
- "**/*.gif":true,
- "**/*.ico":true,
- "**/*.jpg":true,
- "**/*.jpeg":true,
- "**/*.png":true,
- "**/*.psd":true,
- "**/*.tga":true,
- "**/*.tif":true,
- "**/*.tiff":true,
- "**/*.3ds":true,
- "**/*.3DS":true,
- "**/*.fbx":true,
- "**/*.FBX":true,
- "**/*.lxo":true,
- "**/*.LXO":true,
- "**/*.ma":true,
- "**/*.MA":true,
- "**/*.obj":true,
- "**/*.OBJ":true,
- "**/*.asset":true,
- "**/*.cubemap":true,
- "**/*.flare":true,
- "**/*.mat":true,
- "**/*.meta":true,
- "**/*.prefab":true,
- "**/*.unity":true,
- "build/":true,
- "Build/":true,
- "Library/":true,
- "library/":true,
- "obj/":true,
- "Obj/":true,
- "ProjectSettings/":true,
- "temp/":true,
- "Temp/":true
- }
-}
\ No newline at end of file
diff --git a/Assets/Prefab.meta b/Assets/Prefab.meta
new file mode 100644
index 0000000..2ffd895
--- /dev/null
+++ b/Assets/Prefab.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c7b758c5b931f7d48a81f99030584cd6
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Prefab/bullet_105.prefab b/Assets/Prefab/bullet_105.prefab
new file mode 100644
index 0000000..0e7951e
--- /dev/null
+++ b/Assets/Prefab/bullet_105.prefab
@@ -0,0 +1,172 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &1321403650375130719
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1803406985377751684}
+ - component: {fileID: 728066807453616797}
+ m_Layer: 0
+ m_Name: GameObject
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &1803406985377751684
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1321403650375130719}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 1619133627816819449}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!70 &728066807453616797
+CapsuleCollider2D:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1321403650375130719}
+ m_Enabled: 1
+ m_Density: 1
+ m_Material: {fileID: 0}
+ m_IsTrigger: 0
+ m_UsedByEffector: 0
+ m_UsedByComposite: 0
+ m_Offset: {x: 0, y: 0}
+ m_Size: {x: 0.0001, y: 0.0001}
+ m_Direction: 1
+--- !u!1 &8442789017307878925
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1619133627816819449}
+ - component: {fileID: 1882434149266867794}
+ - component: {fileID: 5322296178168887703}
+ - component: {fileID: 5049604820480247189}
+ m_Layer: 0
+ m_Name: bullet_105
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &1619133627816819449
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8442789017307878925}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: -3.81, y: -0.47, z: 0}
+ m_LocalScale: {x: 5, y: 5, z: 0}
+ m_ConstrainProportionsScale: 0
+ m_Children:
+ - {fileID: 1803406985377751684}
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!212 &1882434149266867794
+SpriteRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8442789017307878925}
+ m_Enabled: 1
+ m_CastShadows: 0
+ m_ReceiveShadows: 0
+ m_DynamicOccludee: 1
+ m_StaticShadowCaster: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RayTracingMode: 0
+ m_RayTraceProcedural: 0
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_ReceiveGI: 1
+ m_PreserveUVs: 0
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 1
+ m_SelectedEditorRenderState: 0
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: 0
+ m_Sprite: {fileID: 21300000, guid: 5b268c7d143ff8c4e92d14e58ec06183, type: 3}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_FlipX: 0
+ m_FlipY: 0
+ m_DrawMode: 0
+ m_Size: {x: 0.34, y: 0.14}
+ m_AdaptiveModeThreshold: 0.5
+ m_SpriteTileMode: 0
+ m_WasSpriteAssigned: 1
+ m_MaskInteraction: 0
+ m_SpriteSortPoint: 0
+--- !u!114 &5322296178168887703
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8442789017307878925}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 0e84af4441d8f034fb074282d1904b99, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ damage: 10
+ rigidBody2D: {fileID: 5049604820480247189}
+--- !u!50 &5049604820480247189
+Rigidbody2D:
+ serializedVersion: 4
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8442789017307878925}
+ m_BodyType: 0
+ m_Simulated: 1
+ m_UseFullKinematicContacts: 0
+ m_UseAutoMass: 0
+ m_Mass: 1
+ m_LinearDrag: 0
+ m_AngularDrag: 0.05
+ m_GravityScale: 1
+ m_Material: {fileID: 0}
+ m_Interpolate: 0
+ m_SleepingMode: 1
+ m_CollisionDetection: 0
+ m_Constraints: 0
diff --git a/Assets/Prefab/bullet_105.prefab.meta b/Assets/Prefab/bullet_105.prefab.meta
new file mode 100644
index 0000000..1dd5fad
--- /dev/null
+++ b/Assets/Prefab/bullet_105.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d08590ee691649042b4c72240f8fec7a
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scenes/Prototype.unity b/Assets/Scenes/Prototype.unity
index 1dc5ece..e5e87dc 100644
--- a/Assets/Scenes/Prototype.unity
+++ b/Assets/Scenes/Prototype.unity
@@ -417,7 +417,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
- m_SortingOrder: 0
+ m_SortingOrder: -1
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
@@ -696,3 +696,60 @@ Rigidbody2D:
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
+--- !u!1001 &7858754246842062965
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ m_TransformParent: {fileID: 0}
+ m_Modifications:
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_RootOrder
+ value: 6
+ objectReference: {fileID: 0}
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: -3.81
+ objectReference: {fileID: 0}
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: -0.47
+ objectReference: {fileID: 0}
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 1619133627816819449, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 8442789017307878925, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
+ propertyPath: m_Name
+ value: bullet_105
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: d08590ee691649042b4c72240f8fec7a, type: 3}
diff --git a/Assets/Scripts/Players.meta b/Assets/Scripts/Players.meta
new file mode 100644
index 0000000..5209789
--- /dev/null
+++ b/Assets/Scripts/Players.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e2bb72b338aea7e44a8260a49e98c9e5
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Players/Interface.meta b/Assets/Scripts/Players/Interface.meta
new file mode 100644
index 0000000..ce20814
--- /dev/null
+++ b/Assets/Scripts/Players/Interface.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e793b3834bab1c54c861c2c5618a3928
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Players/Interface/BasePlayerController.cs b/Assets/Scripts/Players/Interface/BasePlayerController.cs
new file mode 100644
index 0000000..3a44712
--- /dev/null
+++ b/Assets/Scripts/Players/Interface/BasePlayerController.cs
@@ -0,0 +1,18 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class BasePlayerController : MonoBehaviour, IDamageable
+{
+ public float Health { get; set; }
+ public float Energy { get; set; }
+
+ private float _healthProperty;
+ private float _energyProperty;
+
+ public void TakeDamage(DamageData data)
+ {
+ var resutDamage = data.Damage;
+ _healthProperty -= resutDamage;
+ }
+}
diff --git a/Assets/Scripts/Players/Interface/BasePlayerController.cs.meta b/Assets/Scripts/Players/Interface/BasePlayerController.cs.meta
new file mode 100644
index 0000000..5177335
--- /dev/null
+++ b/Assets/Scripts/Players/Interface/BasePlayerController.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d096c2edb51d8ee47b6eb4007b5d3888
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Players/Player.cs
similarity index 93%
rename from Assets/Scripts/Player.cs
rename to Assets/Scripts/Players/Player.cs
index c4a69af..d560791 100644
--- a/Assets/Scripts/Player.cs
+++ b/Assets/Scripts/Players/Player.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using UnityEngine;
-public class Player : MonoBehaviour
+public class Player : BasePlayerController
{
[SerializeField] Collider2D boundary;
@@ -23,7 +23,7 @@ private void Update()
{
Vector3 viewPos = transform.position;
viewPos.x = Mathf.Clamp(viewPos.x, boundary.bounds.min.x + _playerWidth, boundary.bounds.max.x - _playerWidth);
- viewPos.y = Mathf.Clamp(viewPos.y, boundary.bounds.min.y + _playerHeight, boundary.bounds.max.y - _playerHeight); `
+ viewPos.y = Mathf.Clamp(viewPos.y, boundary.bounds.min.y + _playerHeight, boundary.bounds.max.y - _playerHeight);
transform.position = viewPos;
}
diff --git a/Assets/Scripts/Player.cs.meta b/Assets/Scripts/Players/Player.cs.meta
similarity index 83%
rename from Assets/Scripts/Player.cs.meta
rename to Assets/Scripts/Players/Player.cs.meta
index f20a4fc..245335b 100644
--- a/Assets/Scripts/Player.cs.meta
+++ b/Assets/Scripts/Players/Player.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 3e75455201130cd43864c935ba61835b
+guid: e1c06956d10b31444984f86f7c355e19
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/Players/PlayerController.cs
similarity index 100%
rename from Assets/Scripts/PlayerController.cs
rename to Assets/Scripts/Players/PlayerController.cs
diff --git a/Assets/Scripts/PlayerController.cs.meta b/Assets/Scripts/Players/PlayerController.cs.meta
similarity index 83%
rename from Assets/Scripts/PlayerController.cs.meta
rename to Assets/Scripts/Players/PlayerController.cs.meta
index 788aa9c..18b9923 100644
--- a/Assets/Scripts/PlayerController.cs.meta
+++ b/Assets/Scripts/Players/PlayerController.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 41390dd645cf0e64eab22b0294256450
+guid: ec4df0e9642fda24e9eab5e4e747073f
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/Scripts/Spells.meta b/Assets/Scripts/Spells.meta
new file mode 100644
index 0000000..1b40820
--- /dev/null
+++ b/Assets/Scripts/Spells.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 277cf5e99faaf384ba97769f89bae46c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Spells/Flux.meta b/Assets/Scripts/Spells/Flux.meta
new file mode 100644
index 0000000..819ff8a
--- /dev/null
+++ b/Assets/Scripts/Spells/Flux.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cf085aba8cecd3048ab0ade6f6e9181f
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Spells/Flux/FluxShot.cs b/Assets/Scripts/Spells/Flux/FluxShot.cs
new file mode 100644
index 0000000..370d2a8
--- /dev/null
+++ b/Assets/Scripts/Spells/Flux/FluxShot.cs
@@ -0,0 +1,26 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.Serialization;
+
+public class FluxShot : ShootingSkill
+{
+ [SerializeField] protected BaseProjectileSpell prefabSpell;
+ [SerializeField] protected Transform shootPoint;
+ [SerializeField] protected float speed = 400f;
+
+ private BaseProjectileSpell _bullet;
+
+ private void Update()
+ {
+ if (Input.GetMouseButtonDown(0))
+ {
+ Shoot();
+ }
+ }
+
+ public override void Shoot()
+ {
+ _bullet = SpawnProjectile(prefabSpell, shootPoint.position);
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Spells/Flux/FluxShot.cs.meta b/Assets/Scripts/Spells/Flux/FluxShot.cs.meta
new file mode 100644
index 0000000..0b1004b
--- /dev/null
+++ b/Assets/Scripts/Spells/Flux/FluxShot.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cf4df7e20e03d8e4f94fd400b35ae091
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Spells/Flux/FluxShotBullet.cs b/Assets/Scripts/Spells/Flux/FluxShotBullet.cs
new file mode 100644
index 0000000..2ecb871
--- /dev/null
+++ b/Assets/Scripts/Spells/Flux/FluxShotBullet.cs
@@ -0,0 +1,28 @@
+using UnityEngine;
+
+public class FluxShotBullet : BaseProjectileSpell
+{
+ private new void Update()
+ {
+ Shoot(transform.rotation, 40f, ForceMode2D.Force);
+ }
+
+ protected override void DamageTarget(Collision2D other)
+ {
+ var damageable = other.gameObject.GetComponent();
+ if (damageable != null)
+ {
+ damageable.TakeDamage(new DamageData
+ {
+ Damage = damage,
+ ImpactObject = gameObject
+ });
+ DeSpawn();
+ }
+ else
+ {
+ //collide with wall
+ DeSpawn();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Spells/Flux/FluxShotBullet.cs.meta b/Assets/Scripts/Spells/Flux/FluxShotBullet.cs.meta
new file mode 100644
index 0000000..b716089
--- /dev/null
+++ b/Assets/Scripts/Spells/Flux/FluxShotBullet.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0e84af4441d8f034fb074282d1904b99
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Spells/Interface.meta b/Assets/Scripts/Spells/Interface.meta
new file mode 100644
index 0000000..2029c58
--- /dev/null
+++ b/Assets/Scripts/Spells/Interface.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 393b6b230aa02ec42b6e432dd42c644a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Spells/Interface/BaseProjectileSpell.cs b/Assets/Scripts/Spells/Interface/BaseProjectileSpell.cs
new file mode 100644
index 0000000..ad29ad3
--- /dev/null
+++ b/Assets/Scripts/Spells/Interface/BaseProjectileSpell.cs
@@ -0,0 +1,43 @@
+using UnityEngine;
+
+public class BaseProjectileSpell : MonoBehaviour
+{
+ [SerializeField] protected float damage;
+ [SerializeField] protected Collision2D spellCollider;
+ [SerializeField] protected Rigidbody2D rigidBody2D;
+
+ private Vector2 _screenPosition;
+
+ private Vector3 _worldPosition;
+
+ protected void Update()
+ {
+ if (Input.GetMouseButtonDown(0))
+ {
+ Vector3 mousePos = Input.mousePosition;
+ _screenPosition = new Vector2(mousePos.x, mousePos.y);
+ }
+
+ _worldPosition = Camera.main.ScreenToWorldPoint(_screenPosition);
+ }
+
+ protected virtual void DamageTarget(Collision2D other) { }
+
+ protected virtual void OnCollisionEnter2D(Collision2D other)
+ {
+ DamageTarget(other);
+ }
+
+ protected virtual void Shoot(Quaternion angle, float speed, ForceMode2D forceMode2D = ForceMode2D.Impulse)
+ {
+ transform.rotation = angle;
+ rigidBody2D.SetRotation(angle);
+ rigidBody2D.AddRelativeForce(Vector2.up * speed, forceMode2D);
+
+ }
+
+ protected virtual void DeSpawn()
+ {
+ Destroy(this.gameObject);
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Spells/Interface/BaseProjectileSpell.cs.meta b/Assets/Scripts/Spells/Interface/BaseProjectileSpell.cs.meta
new file mode 100644
index 0000000..3a555cd
--- /dev/null
+++ b/Assets/Scripts/Spells/Interface/BaseProjectileSpell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b573d745d94c50240a83ee3b28223fea
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Spells/ShootingSkill.cs b/Assets/Scripts/Spells/ShootingSkill.cs
new file mode 100644
index 0000000..8cc3215
--- /dev/null
+++ b/Assets/Scripts/Spells/ShootingSkill.cs
@@ -0,0 +1,14 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public abstract class ShootingSkill : MonoBehaviour
+{
+ public abstract void Shoot();
+
+ protected virtual BaseProjectileSpell SpawnProjectile(BaseProjectileSpell prefab, Vector3 position)
+ {
+ var spell = Instantiate(prefab, position, Quaternion.identity);
+ return spell;
+ }
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Spells/ShootingSkill.cs.meta b/Assets/Scripts/Spells/ShootingSkill.cs.meta
new file mode 100644
index 0000000..e189215
--- /dev/null
+++ b/Assets/Scripts/Spells/ShootingSkill.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b547fc7ea79c2ab4382127e1a833939f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Utils.meta b/Assets/Scripts/Utils.meta
new file mode 100644
index 0000000..6811cd2
--- /dev/null
+++ b/Assets/Scripts/Utils.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 34218aacc3c9fc4438c998ed9b25f85b
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/ForceCameraRatio.cs b/Assets/Scripts/Utils/ForceCameraRatio.cs
similarity index 100%
rename from Assets/Scripts/ForceCameraRatio.cs
rename to Assets/Scripts/Utils/ForceCameraRatio.cs
diff --git a/Assets/Scripts/ForceCameraRatio.cs.meta b/Assets/Scripts/Utils/ForceCameraRatio.cs.meta
similarity index 83%
rename from Assets/Scripts/ForceCameraRatio.cs.meta
rename to Assets/Scripts/Utils/ForceCameraRatio.cs.meta
index c75de22..f50970f 100644
--- a/Assets/Scripts/ForceCameraRatio.cs.meta
+++ b/Assets/Scripts/Utils/ForceCameraRatio.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 8f04eb23e3a71dd4fa42338714e99671
+guid: 404e331b08bb3a240a347b7c7fb90f46
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/Scripts/Utils/IDamageable.cs b/Assets/Scripts/Utils/IDamageable.cs
new file mode 100644
index 0000000..f26a862
--- /dev/null
+++ b/Assets/Scripts/Utils/IDamageable.cs
@@ -0,0 +1,12 @@
+using UnityEngine;
+
+public interface IDamageable
+{
+ void TakeDamage(DamageData data);
+}
+
+public struct DamageData
+{
+ public float Damage;
+ public GameObject ImpactObject;
+}
\ No newline at end of file
diff --git a/Assets/Scripts/Utils/IDamageable.cs.meta b/Assets/Scripts/Utils/IDamageable.cs.meta
new file mode 100644
index 0000000..adf3a81
--- /dev/null
+++ b/Assets/Scripts/Utils/IDamageable.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 22b0f09898eb93542a75a80ebe0f2dd4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Sprites/GameEntities.meta b/Assets/Sprites/GameEntities.meta
new file mode 100644
index 0000000..26dd91c
--- /dev/null
+++ b/Assets/Sprites/GameEntities.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: fa0278790266bef458d95c49054381f9
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Sprites/GameEntities/bullet_105.png b/Assets/Sprites/GameEntities/bullet_105.png
new file mode 100644
index 0000000..03b0f51
--- /dev/null
+++ b/Assets/Sprites/GameEntities/bullet_105.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e7e8f59a0421949db2dfeb71e777f181eab17f2d9ec3dd6b0ca0dc6a8cd11493
+size 203
diff --git a/Assets/Sprites/GameEntities/bullet_105.png.meta b/Assets/Sprites/GameEntities/bullet_105.png.meta
new file mode 100644
index 0000000..72b57b0
--- /dev/null
+++ b/Assets/Sprites/GameEntities/bullet_105.png.meta
@@ -0,0 +1,134 @@
+fileFormatVersion: 2
+guid: 5b268c7d143ff8c4e92d14e58ec06183
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 11
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMasterTextureLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 0
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 1
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 20
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 8
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ platformSettings:
+ - serializedVersion: 3
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: Server
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: Android
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID: 5e97eb03825dee720800000000000000
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ nameFileIdTable: {}
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/manifest.json b/Packages/manifest.json
index ac41e8e..5e30318 100644
--- a/Packages/manifest.json
+++ b/Packages/manifest.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "com.unity.collab-proxy": "1.15.17",
+ "com.unity.collab-proxy": "1.15.18",
"com.unity.feature.2d": "1.0.0",
"com.unity.ide.rider": "3.0.14",
"com.unity.ide.visualstudio": "2.0.15",
diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json
index 3b227af..bfe6007 100644
--- a/Packages/packages-lock.json
+++ b/Packages/packages-lock.json
@@ -95,7 +95,7 @@
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
- "version": "1.15.17",
+ "version": "1.15.18",
"depth": 0,
"source": "registry",
"dependencies": {
diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset
index 2ed1261..e6c7d27 100644
--- a/ProjectSettings/ProjectSettings.asset
+++ b/ProjectSettings/ProjectSettings.asset
@@ -270,7 +270,99 @@ PlayerSettings:
AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 150
m_BuildTargetIcons: []
- m_BuildTargetPlatformIcons: []
+ m_BuildTargetPlatformIcons:
+ - m_BuildTarget: Android
+ m_Icons:
+ - m_Textures: []
+ m_Width: 432
+ m_Height: 432
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 324
+ m_Height: 324
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 216
+ m_Height: 216
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 162
+ m_Height: 162
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 108
+ m_Height: 108
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 81
+ m_Height: 81
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 192
+ m_Height: 192
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 144
+ m_Height: 144
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 96
+ m_Height: 96
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 72
+ m_Height: 72
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 48
+ m_Height: 48
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 36
+ m_Height: 36
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 192
+ m_Height: 192
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 144
+ m_Height: 144
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 96
+ m_Height: 96
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 72
+ m_Height: 72
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 48
+ m_Height: 48
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 36
+ m_Height: 36
+ m_Kind: 0
+ m_SubKind:
m_BuildTargetBatching: []
m_BuildTargetGraphicsJobs:
- m_BuildTarget: MacStandaloneSupport
@@ -544,6 +636,7 @@ PlayerSettings:
ps4videoRecordingFeaturesUsed: 0
ps4contentSearchFeaturesUsed: 0
ps4CompatibilityPS5: 0
+ ps4AllowPS5Detection: 0
ps4GPU800MHz: 1
ps4attribEyeToEyeDistanceSettingVR: 0
ps4IncludedModules: []