moved stuff to a different entity script

This commit is contained in:
Sylvia 2026-06-09 18:46:33 -07:00
parent f4344c4700
commit a0bfc600ef
14 changed files with 497 additions and 189 deletions

View file

@ -1,11 +1,14 @@
using System;
using UnityEngine;
public class Ability : MonoBehaviour
{
[Header("Identification")]
public string abilityName;
public Entity thisEntity;
[Header("Cooldown")]
protected float currentCooldown;
public float cooldown;
[Header("Stats")]
public float power;
public Vector3 targetLocation;
@ -15,11 +18,6 @@ public class Ability : MonoBehaviour
{
currentCooldown -= Time.deltaTime;
}
if (Input.GetMouseButtonDown(0))
{
TryAbility(); //testing, please remove
}
}
public bool TryAbility()
@ -28,8 +26,10 @@ public class Ability : MonoBehaviour
{
AbilityEffects();
currentCooldown = cooldown;
Debug.Log($"Ability {abilityName} SUCCESS");
return true;
}
Debug.Log($"Ability {abilityName} ON COOLDOWN");
return false;
}
protected virtual void AbilityEffects()