Moved from swarm to NavMesh - need to fix the enemy navigation! Review the animation controller to see if anything is being triggered.
This commit is contained in:
@@ -11,15 +11,18 @@ public class Pickup : MonoBehaviour
|
||||
|
||||
[Header("Health Settings")]
|
||||
public int healAmount = 50;
|
||||
public GameObject healthVFX;
|
||||
|
||||
[Header("Strength Settings")]
|
||||
public float strengthMultiplier = 2.0f; // Doubles damage and knockback
|
||||
public float strengthDuration = 10f;
|
||||
public GameObject strengthVFX;
|
||||
|
||||
[Header("Stun Settings")]
|
||||
public float stunRadius = 8f;
|
||||
public float stunDuration = 5f;
|
||||
public LayerMask enemyLayer;
|
||||
public GameObject stunVFX;
|
||||
|
||||
void Update()
|
||||
{
|
||||
@@ -47,15 +50,18 @@ public class Pickup : MonoBehaviour
|
||||
case PickupType.Health:
|
||||
PlayerHealth health = player.GetComponent<PlayerHealth>();
|
||||
if (health != null) health.Heal(healAmount);
|
||||
Instantiate(healthVFX, player.transform.position + Vector3.up * 0.1f, player.transform.rotation, player.transform);
|
||||
break;
|
||||
|
||||
case PickupType.Strength:
|
||||
SyntyPlayerCombat combat = player.GetComponentInChildren<SyntyPlayerCombat>();
|
||||
SyntyPlayerCombat combat = player.GetComponent<SyntyPlayerCombat>();
|
||||
if (combat != null) combat.ApplyStrengthBuff(strengthMultiplier, strengthDuration);
|
||||
Instantiate(strengthVFX, transform.position, transform.rotation);
|
||||
break;
|
||||
|
||||
case PickupType.StunBomb:
|
||||
ExecuteStunBomb(transform.position);
|
||||
Instantiate(stunVFX, transform.position, transform.rotation);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user