you really gotta calm down, marisa...
This commit is contained in:
parent
13bb58ea03
commit
b9fb490dce
68 changed files with 990 additions and 44 deletions
40
Assets/Scripts/Abilities/PlayerAbilities/PlayerAbility.cs
Normal file
40
Assets/Scripts/Abilities/PlayerAbilities/PlayerAbility.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerAbility : MonoBehaviour
|
||||
{
|
||||
[Header("Identification")]
|
||||
public string abilityName;
|
||||
public Sprite abilityIcon;
|
||||
public Marisa thisPlayer;
|
||||
[Header("Cooldown")]
|
||||
public bool canCooldown = true;
|
||||
public float cooldown;
|
||||
protected float currentCooldown;
|
||||
[Header("Stats")]
|
||||
public float power;
|
||||
public float projectileCount;
|
||||
public HashSet<AbilityUpgrade> attachedUpgrades = new();
|
||||
|
||||
public void TryAbility()
|
||||
{
|
||||
if (currentCooldown <= 0 && canCooldown)
|
||||
{
|
||||
currentCooldown = cooldown;
|
||||
AbilityEffects();
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void AbilityEffects()
|
||||
{
|
||||
|
||||
}
|
||||
protected virtual void Update()
|
||||
{
|
||||
if (currentCooldown > 0)
|
||||
{
|
||||
currentCooldown -= Time.deltaTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue