diff --git a/Assets/Scripts/BrakeBarController.cs b/Assets/Scripts/BrakeBarController.cs index f9c0ab8..5ecfdb0 100644 --- a/Assets/Scripts/BrakeBarController.cs +++ b/Assets/Scripts/BrakeBarController.cs @@ -28,16 +28,15 @@ public class BrakeBarController : MonoBehaviour { private void UpdatePointer() { - if (Input.GetKey(KeyCode.S)) + while (Input.GetKey(KeyCode.S)) { - firstTime = Time.time; + firstTime += 1; } if (Input.GetKeyUp(KeyCode.S)) { - secondTime = Time.time; - float difference = secondTime - firstTime; - gameObject.transform.Rotate(Vector3.forward, difference); + + gameObject.transform.Rotate(Vector3.forward, firstTime); } diff --git a/Assets/Scripts/Entities/Maikäfer.cs b/Assets/Scripts/Entities/Maikäfer.cs new file mode 100644 index 0000000..13e1a0c --- /dev/null +++ b/Assets/Scripts/Entities/Maikäfer.cs @@ -0,0 +1,20 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Assets.Scripts.Entities.Attack; + +namespace Assets.Scripts.Entities { + +public class Maikäfer : MonoBehaviourEnemy { + + public Maikäfer() : base(15) + { + + } + + private void Start() + { + SetAttack(new MeleeAttack(this.gameObject)); + } + } +} diff --git a/Assets/Scripts/Entities/Maikäfer.cs.meta b/Assets/Scripts/Entities/Maikäfer.cs.meta new file mode 100644 index 0000000..c7b9745 --- /dev/null +++ b/Assets/Scripts/Entities/Maikäfer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c5616b0c23c6dce40b9019a2217bc1a8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Entities/Spider.cs b/Assets/Scripts/Entities/Spider.cs new file mode 100644 index 0000000..c503622 --- /dev/null +++ b/Assets/Scripts/Entities/Spider.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using Assets.Scripts.Entities.Attack; + +namespace Assets.Scripts.Entities +{ + class Spider : Enemy + { + public Spider() : base(45) + { + + } + + private void Start() + { + SetAttack(new SingleShot(this.gameObject)); + } + } +} diff --git a/Assets/Scripts/Entities/Spider.cs.meta b/Assets/Scripts/Entities/Spider.cs.meta new file mode 100644 index 0000000..18932e5 --- /dev/null +++ b/Assets/Scripts/Entities/Spider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bba8747a38e6f32488753602d0a3f3e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/graphics/textures/car.meta b/Assets/graphics/textures/car.meta deleted file mode 100644 index 8504594..0000000 --- a/Assets/graphics/textures/car.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9ec323b9157704d00a3409f8ea6e46b2 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/graphics/textures/tmp.meta b/Assets/graphics/textures/tmp.meta deleted file mode 100644 index 7ebab68..0000000 --- a/Assets/graphics/textures/tmp.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: df6e7833427b5497b92308fb6f54e552 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: