From 95f94d062dbeb36c6bbae07e713104132d8a5741 Mon Sep 17 00:00:00 2001 From: Noah4ever <66632359+Noah4ever@users.noreply.github.com> Date: Tue, 30 Nov 2021 10:16:28 +0100 Subject: [PATCH] deleted old "SearchForNext" Julius hat was besseres gemacht :( --- Assets/Scripts/Weapons/WeaponManager.cs | 41 ------------------------- ProjectSettings/ProjectVersion.txt | 4 +-- 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/Assets/Scripts/Weapons/WeaponManager.cs b/Assets/Scripts/Weapons/WeaponManager.cs index 160e13d..256ba26 100644 --- a/Assets/Scripts/Weapons/WeaponManager.cs +++ b/Assets/Scripts/Weapons/WeaponManager.cs @@ -89,47 +89,6 @@ public class WeaponManager : NetworkBehaviour } - - private int searchForNextOld(List l, int lastActive = 0, int direction = 1) { - int size = l.Count; - bool condition = true; - int counter = 0; - foreach (GameObject obj in l) { if(obj == null) { counter++; } } - if(counter < 4) { - if (lastActive <= -1) { lastActive = size; } - if (lastActive >= l.Count) { lastActive = 0; } - for (int i = lastActive + direction; condition; i += direction) { - if (i >= l.Count) { - i = 0; size = lastActive; - } - else if (i < 0) { - i = size - 1; size = -1; - } - - Debug.Log("1 " + i); - - if (l[i] != null) { - if (l[lastActive] != null) { - l[lastActive].SetActive(false); - } - return i; - } - - Debug.Log("2 " + i); - - if (direction == 1) { - if (i <= size - 1) { condition = true; } - else { condition = false; } - } else if (direction == -1) { - if (i >= size - 1) { condition = true; } - else { condition = false; } - } - } - } - - return -1; - } - public GameObject getCurrentWeapon() { return activeWeapons[currentWeaponIndex].gameObject; } diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index d1f16a3..03f4c05 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2021.2.3f1 -m_EditorVersionWithRevision: 2021.2.3f1 (32358a8527b4) +m_EditorVersion: 2021.2.0f1 +m_EditorVersionWithRevision: 2021.2.0f1 (4bf1ec4b23c9)