added endscreen

This commit is contained in:
MrTorex committed 2026-02-24 10:32:41 +03:00
1 parent a33eb50ca0
commit 8328f2a979
15 files changed
+991 -89

No files matched your search

@@ -7,10 +7,10 @@ namespace Code.Gameplay.Character.Inventory
{
public class WeaponInventory : MonoBehaviour
{
[SerializeField] private List<WeaponBase> weapons = new List<WeaponBase>();
[SerializeField] private List<WeaponBase> weapons = new();
[SerializeField] private Transform weaponHolder;
[SerializeField] private int currentWeaponIndex = 0;
[SerializeField] private int currentWeaponIndex;
public event Action<WeaponBase> OnWeaponSwitched;
public event Action OnWeaponsInitialized;
@@ -54,13 +54,13 @@ namespace Code.Gameplay.Character.Inventory
public void NextWeapon()
{
int nextIndex = (currentWeaponIndex + 1) % weapons.Count;
var nextIndex = (currentWeaponIndex + 1) % weapons.Count;
SwitchWeapon(nextIndex);
}
public void PreviousWeapon()
{
int prevIndex = (currentWeaponIndex - 1 + weapons.Count) % weapons.Count;
var prevIndex = (currentWeaponIndex - 1 + weapons.Count) % weapons.Count;
SwitchWeapon(prevIndex);
}
@@ -68,7 +68,7 @@ namespace Code.Gameplay.Character.Inventory
{
if (weapons.Contains(weapon))
{
int index = weapons.IndexOf(weapon);
var index = weapons.IndexOf(weapon);
weapons.Remove(weapon);
Destroy(weapon.gameObject);