From 7233de56b9f8eafaa48c8dc05aef37eabb524c58 Mon Sep 17 00:00:00 2001 From: Ny Bruker <robinhs@stud.ntnu.no> Date: Fri, 9 Dec 2022 17:09:00 +0100 Subject: [PATCH] Removed unused code. --- MrBigsock/Assets/Code/PlayerController.cs | 32 ----------------------- 1 file changed, 32 deletions(-) diff --git a/MrBigsock/Assets/Code/PlayerController.cs b/MrBigsock/Assets/Code/PlayerController.cs index 40982143..124cabcd 100644 --- a/MrBigsock/Assets/Code/PlayerController.cs +++ b/MrBigsock/Assets/Code/PlayerController.cs @@ -229,38 +229,6 @@ namespace BigSock { } - private void CheckAbilityInput2(KeyCode key, IAbility ability) { - var par = GetAbilityParam(Camera.main.ScreenToWorldPoint(Input.mousePosition)); - - switch (ability.FireType) { - // Standard: Press to fire. - case FireType.Standard: - if (Input.GetKeyDown(key)) ability.Use(par); - break; - // FullAuto: Keep firing while key is down. - case FireType.FullAuto: - if (Input.GetKey(key)) ability.Use(par); - break; - // Charge: Fire when let go. - case FireType.Charge: - // If pressed down: Store start time. - if (Input.GetKeyDown(key)) chargeStarts[key] = Time.time; - // If let go: Activate - else if (Input.GetKeyUp(key)) { - par.ChargeTime = Time.time - chargeStarts[key]; - var t = ability.Use(par); - if (!t) { - if (par.ChargeTime < ability.MinCharge) - Debug.Log($"[PlayerController.CheckAbilityInput({key})] {ability.Name} not fired ({par.ChargeTime:N3} < {ability.MinCharge:N3})"); - } - } - break; - default: - break; - } - - } - private void Update() { // Regenerate mana & stamina. -- GitLab