diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index 5d8c6b06..49f7951b 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -52,21 +52,18 @@ false - - - + - - + diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 5645fff2..29ca892d 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -213,9 +213,9 @@ GameObject: - component: {fileID: 8620307} - component: {fileID: 8620306} - component: {fileID: 8620308} - - component: {fileID: 8620311} - component: {fileID: 8620310} - component: {fileID: 8620309} + - component: {fileID: 8620311} m_Layer: 0 m_Name: Bat_1 m_TagString: Untagged @@ -363,11 +363,11 @@ MonoBehaviour: m_GameObject: {fileID: 8620305} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 69ab2a73bdf94144c9b5b758d5361e50, type: 3} + m_Script: {fileID: 11500000, guid: 5ebb8998660f8a44f8b4f3d17a50103f, type: 3} m_Name: m_EditorClassIdentifier: moveSpeed: 4 - enemyName: Batman + enemyName: maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2} health: 0 path: @@ -507,10 +507,10 @@ MonoBehaviour: m_GameObject: {fileID: 68076400} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4421f6d37bca0b64aaf4e016121f133b, type: 3} + m_Script: {fileID: 11500000, guid: 5ebb8998660f8a44f8b4f3d17a50103f, type: 3} m_Name: m_EditorClassIdentifier: - moveSpeed: 4 + moveSpeed: 6 enemyName: maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2} health: 0 @@ -1265,11 +1265,11 @@ MonoBehaviour: m_GameObject: {fileID: 242009510} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 69ab2a73bdf94144c9b5b758d5361e50, type: 3} + m_Script: {fileID: 11500000, guid: 5ebb8998660f8a44f8b4f3d17a50103f, type: 3} m_Name: m_EditorClassIdentifier: moveSpeed: 4 - enemyName: Bat0 + enemyName: maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2} health: 0 path: @@ -2420,10 +2420,10 @@ MonoBehaviour: m_GameObject: {fileID: 641696201} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b5b132894dc32424c8b6d1ba97c27535, type: 3} + m_Script: {fileID: 11500000, guid: 5ebb8998660f8a44f8b4f3d17a50103f, type: 3} m_Name: m_EditorClassIdentifier: - moveSpeed: 1.5 + moveSpeed: 3 enemyName: maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2} health: 0 @@ -2625,10 +2625,10 @@ MonoBehaviour: m_GameObject: {fileID: 682072029} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b5b132894dc32424c8b6d1ba97c27535, type: 3} + m_Script: {fileID: 11500000, guid: 5ebb8998660f8a44f8b4f3d17a50103f, type: 3} m_Name: m_EditorClassIdentifier: - moveSpeed: 1.5 + moveSpeed: 3 enemyName: maxHealth: {fileID: 11400000, guid: 1a234827b90bfc24da563fbd5ffb412a, type: 2} health: 0 diff --git a/Assets/Scripts/Enemies' Scprits/PatrolBat.cs.meta b/Assets/Scripts/Enemies' Scprits/PatrolBat.cs.meta deleted file mode 100644 index 202ab95a..00000000 --- a/Assets/Scripts/Enemies' Scprits/PatrolBat.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 69ab2a73bdf94144c9b5b758d5361e50 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Enemies' Scprits/PatrolBat.cs b/Assets/Scripts/Enemies' Scprits/PatrollingEnemy.cs similarity index 93% rename from Assets/Scripts/Enemies' Scprits/PatrolBat.cs rename to Assets/Scripts/Enemies' Scprits/PatrollingEnemy.cs index 5d616288..29d70279 100644 --- a/Assets/Scripts/Enemies' Scprits/PatrolBat.cs +++ b/Assets/Scripts/Enemies' Scprits/PatrollingEnemy.cs @@ -2,9 +2,8 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public class PatrolBat : Enemy +public class PatrollingEnemy : Enemy { - public Transform[] path; public int currentPoint; public Transform currentGoal; diff --git a/Assets/Scripts/Enemies' Scprits/Slimes.cs.meta b/Assets/Scripts/Enemies' Scprits/PatrollingEnemy.cs.meta similarity index 83% rename from Assets/Scripts/Enemies' Scprits/Slimes.cs.meta rename to Assets/Scripts/Enemies' Scprits/PatrollingEnemy.cs.meta index 39a25cfd..29fe635b 100644 --- a/Assets/Scripts/Enemies' Scprits/Slimes.cs.meta +++ b/Assets/Scripts/Enemies' Scprits/PatrollingEnemy.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b5b132894dc32424c8b6d1ba97c27535 +guid: 5ebb8998660f8a44f8b4f3d17a50103f MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/Enemies' Scprits/Skeleton.cs b/Assets/Scripts/Enemies' Scprits/Skeleton.cs deleted file mode 100644 index bbd15a87..00000000 --- a/Assets/Scripts/Enemies' Scprits/Skeleton.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Skeleton : Enemy -{ - public Transform[] path; - public int currentPoint; - public Transform currentGoal; - public float roundingDistance; - - private Rigidbody2D myRigidbody; - //public Transform target; - public Animator anim; - - // Start is called before the first frame update - void Start() - { - myRigidbody = GetComponent(); - anim = GetComponent(); - } - - // Update is called once per frame - void Update() - { - if (Vector3.Distance(transform.position, path[currentPoint].position) > roundingDistance) - { - Vector3 temp = Vector3.MoveTowards(transform.position, path[currentPoint].position, moveSpeed * Time.deltaTime); - //changeAnim(temp - transform.position); - myRigidbody.MovePosition(temp); - } - else - { - changeGoal(); - } - - } - - private void changeGoal() - { - if (currentPoint == path.Length - 1) - { - currentPoint = 0; - currentGoal = path[0]; - } - else - { - currentPoint++; - currentGoal = path[currentPoint]; - } - } -} diff --git a/Assets/Scripts/Enemies' Scprits/Skeleton.cs.meta b/Assets/Scripts/Enemies' Scprits/Skeleton.cs.meta deleted file mode 100644 index 58fe883a..00000000 --- a/Assets/Scripts/Enemies' Scprits/Skeleton.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4421f6d37bca0b64aaf4e016121f133b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Enemies' Scprits/Slimes.cs b/Assets/Scripts/Enemies' Scprits/Slimes.cs deleted file mode 100644 index da240815..00000000 --- a/Assets/Scripts/Enemies' Scprits/Slimes.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Slimes : Enemy -{ - - public Transform[] path; - public int currentPoint; - public Transform currentGoal; - public float roundingDistance; - - private Rigidbody2D myRigidbody; - //public Transform target; - public Animator anim; - - // Start is called before the first frame update - void Start() - { - myRigidbody = GetComponent(); - anim = GetComponent(); - } - - // Update is called once per frame - void Update() - { - if (Vector3.Distance(transform.position, path[currentPoint].position) > roundingDistance) - { - Vector3 temp = Vector3.MoveTowards(transform.position, path[currentPoint].position, moveSpeed * Time.deltaTime); - //changeAnim(temp - transform.position); - myRigidbody.MovePosition(temp); - } - else - { - changeGoal(); - } - - } - - private void changeGoal() - { - if (currentPoint == path.Length - 1) - { - currentPoint = 0; - currentGoal = path[0]; - } - else - { - currentPoint++; - currentGoal = path[currentPoint]; - } - } -}