From 18ec2c326fc64c22f4240ba582299f1230f8bb57 Mon Sep 17 00:00:00 2001 From: Unknown <34045228+sommerlilie@users.noreply.github.com> Date: Mon, 23 Apr 2018 16:08:16 +0200 Subject: [PATCH] =?UTF-8?q?Maik=C3=A4fer=20+=20Spider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/BrakeBarController.cs | 9 ++++----- Assets/Scripts/Entities/Maikäfer.cs | 20 ++++++++++++++++++++ Assets/Scripts/Entities/Maikäfer.cs.meta | 11 +++++++++++ Assets/Scripts/Entities/Spider.cs | 20 ++++++++++++++++++++ Assets/Scripts/Entities/Spider.cs.meta | 11 +++++++++++ Assets/graphics/textures/car.meta | 8 -------- Assets/graphics/textures/tmp.meta | 8 -------- 7 files changed, 66 insertions(+), 21 deletions(-) create mode 100644 Assets/Scripts/Entities/Maikäfer.cs create mode 100644 Assets/Scripts/Entities/Maikäfer.cs.meta create mode 100644 Assets/Scripts/Entities/Spider.cs create mode 100644 Assets/Scripts/Entities/Spider.cs.meta delete mode 100644 Assets/graphics/textures/car.meta delete mode 100644 Assets/graphics/textures/tmp.meta 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: