Weapons damages update if value change
This commit is contained in:
1 parent
d6f946acf1
commit
d265c8214a
2 files changed
+14
-20
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user