Add Advanced and Elite Enemy prefabs; adjust attributes and implement projectile behavior
This commit is contained in:
@@ -33,6 +33,8 @@ namespace AI
|
||||
|
||||
private void SetTarget()
|
||||
{
|
||||
if (!GameManager.Instance.Player) return;
|
||||
|
||||
target = GameManager.Instance.Player.transform;
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Inventory;
|
||||
using Systems;
|
||||
@@ -13,6 +14,7 @@ namespace Shop
|
||||
[SerializeField] private Transform weaponSlotParent;
|
||||
[SerializeField] private ShopSlotUI slotPrefab;
|
||||
[SerializeField] private TextMeshProUGUI roundsText;
|
||||
[SerializeField] private TextMeshProUGUI coinsText;
|
||||
|
||||
private List<ShopSlotUI> currentSlots = new();
|
||||
|
||||
@@ -26,6 +28,11 @@ namespace Shop
|
||||
GameManager.Instance.OnRoundEnd -= UpdateRoundText;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
coinsText.text = $"Coins: {GameManager.Instance.Coins}";
|
||||
}
|
||||
|
||||
public void Show(List<StatModifierItem> items, List<WeaponItem> weapons, ShopManager shopManager)
|
||||
{
|
||||
GameManager.Instance.StoreIsClosed = false;
|
||||
|
@@ -19,6 +19,11 @@ namespace Systems
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!target)
|
||||
{
|
||||
AquirePlayerTarget();
|
||||
}
|
||||
|
||||
if (!target || weapons.Count == 0) return;
|
||||
|
||||
foreach (var weapon in weapons)
|
||||
@@ -26,5 +31,11 @@ namespace Systems
|
||||
weapon.Target = target.position;
|
||||
}
|
||||
}
|
||||
|
||||
private void AquirePlayerTarget()
|
||||
{
|
||||
var player = GameManager.Instance.Player;
|
||||
target = player ? player.transform : null;
|
||||
}
|
||||
}
|
||||
}
|
@@ -37,7 +37,7 @@ namespace Systems
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
// DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user