Weapons damages update if value change

This commit is contained in:
2023-10-17 14:00:29 +02:00
parent d6f946acf1
commit d265c8214a
2 changed files with 14 additions and 20 deletions
+8
View File
@@ -5,8 +5,16 @@ public class Sword : MonoBehaviour
{
public int Damages = 25;
private PlayerManager _manager;
private void Start()
{
_manager = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerManager>();
}
private void Update()
{
Damages = _manager.SwordsDamages;
RotateSword();
}