fix: state management/null target
This commit is contained in:
@@ -38,10 +38,8 @@ namespace Reset.Items{
|
||||
void SetTarget(){
|
||||
target = null;
|
||||
|
||||
Debug.Log($"{weaponVariables["target"]}, {weaponVariables["target"] as GameObject}");
|
||||
|
||||
if (weaponVariables["target"] != null) {
|
||||
target = (weaponVariables["target"] as Transform);
|
||||
target = (Transform)weaponVariables["target"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user