the scarlet police still have me at gunpoint
This commit is contained in:
parent
2ca43ec836
commit
980deb5d09
6 changed files with 1467 additions and 39 deletions
24
Assets/Scripts/Abilities/FloatingAbilityInfo.cs
Normal file
24
Assets/Scripts/Abilities/FloatingAbilityInfo.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class FloatingAbilityInfo : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Vector3 offset;
|
||||
[SerializeField] private TextMeshProUGUI abilityName;
|
||||
[SerializeField] private TextMeshProUGUI powerStat;
|
||||
[SerializeField] private TextMeshProUGUI cooldownStat;
|
||||
[SerializeField] private TextMeshProUGUI projectileCountStat;
|
||||
private void Update()
|
||||
{
|
||||
transform.position = Input.mousePosition - offset;
|
||||
}
|
||||
|
||||
public void ShowInfo(PlayerAbility ability)
|
||||
{
|
||||
abilityName.text = ability.abilityName;
|
||||
powerStat.text = $"Power: {ability.power}";
|
||||
cooldownStat.text = $"Cooldown: {ability.cooldown}";
|
||||
projectileCountStat.text = $"Projectiles: {ability.projectileCount}";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue