You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HighGroundRoyaleNetcode/Assets/Scripts/Gameplay/Ability.cs

28 lines
744 B
C#

using UnityEngine;
public abstract class Ability : ScriptableObject
{
[Header("Ability Settings")]
public string abilityName;
public string abilityKey;
public KeyCode keybind; // Key to activate the ability
public float cooldownTime; // Cooldown duration in seconds
public float abilityRadius;
public float abilityDuration;
public float abilityMagnitude;
[SerializeField]
private GameObject abilityPrefab; // Prefab associated with this ability
public GameObject GetPrefab()
{
return abilityPrefab;
}
public void ActivateAbility(GameObject owner)
{
Activate(owner);
}
protected abstract void Activate(GameObject owner); // Logic for the specific ability
}