diff --git a/Assets/Ratbot.cs b/Assets/Ratbot.cs index 7c9e6b4..35820bb 100644 --- a/Assets/Ratbot.cs +++ b/Assets/Ratbot.cs @@ -20,7 +20,7 @@ public class Ratbot : MonoBehaviour // Constantly move towards player Rigidbody2D controller = GetComponent(); Vector2 direction = (player.transform.position - transform.position).normalized; - controller.linearVelocity = direction*moveSpeed; + controller.linearVelocity = direction*moveSpeed*Time.deltaTime; } void OnCollisionStay2D(Collision2D collision) { diff --git a/Assets/Ratbot.prefab b/Assets/Ratbot.prefab index 0e0208b..df88630 100644 --- a/Assets/Ratbot.prefab +++ b/Assets/Ratbot.prefab @@ -102,7 +102,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4d75aac518cf9dca0b16bb5a2e347204, type: 3} m_Name: m_EditorClassIdentifier: - moveSpeed: 4 + moveSpeed: 200 damageStrength: 10 damageTimeoutSeconds: 0.5 health: 10 diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index e284676..d47e394 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -315,6 +315,10 @@ PrefabInstance: propertyPath: m_RenderPostProcessing value: 0 objectReference: {fileID: 0} + - target: {fileID: 6118034672792182209, guid: e05928a0d673caf999d31b31b994a112, type: 3} + propertyPath: moveSpeed + value: 3000 + objectReference: {fileID: 0} - target: {fileID: 6118034672792182209, guid: e05928a0d673caf999d31b31b994a112, type: 3} propertyPath: dashDistance value: 1000 @@ -542,7 +546,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 58ed146781c2cc8bd972920fd08533fe, type: 3} m_Name: m_EditorClassIdentifier: - state: Start + state: 0 wave: 0 ratbot: {fileID: 398740452138961375, guid: 5887eeeb7c78eb5c7bf46c5893fd4846, type: 3} shop: {fileID: 6569104281457075541, guid: c0d23b24c9c882ef89013998dab29dea, type: 3} diff --git a/Assets/Shop/Shop.prefab b/Assets/Shop/Shop.prefab index e62dc02..a9ef38d 100644 --- a/Assets/Shop/Shop.prefab +++ b/Assets/Shop/Shop.prefab @@ -1381,7 +1381,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: upgrade: 5 - amount: 5 + amount: 1000 --- !u!1 &4600683873005582980 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Teo.cs b/Assets/Teo.cs index e4ea0bd..f7c07be 100644 --- a/Assets/Teo.cs +++ b/Assets/Teo.cs @@ -29,9 +29,9 @@ public class Teo : MonoBehaviour // Move player if (!dashing) { controller.AddRelativeForce (new Vector2 ( - Input.GetAxis("Horizontal"), - Input.GetAxis("Vertical") - ).normalized * moveSpeed); + Input.GetAxisRaw("Horizontal"), + Input.GetAxisRaw("Vertical") + ).normalized * moveSpeed * Time.deltaTime); } // Attack on click if not on cooldown if (Input.GetMouseButtonDown(0)) {