SHE'S PULLING HER SPARK OUT

This commit is contained in:
reisenlol 2026-02-02 22:30:39 -08:00
parent b968ed3060
commit 11d1cbb543
No known key found for this signature in database
7 changed files with 2912 additions and 6 deletions

View file

@ -0,0 +1,16 @@
using UnityEngine;
public class AbilityUIHandler : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e7a1d413a4177c296860fb5599a53a0b

View file

@ -0,0 +1,31 @@
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class AbilityUIObject : MonoBehaviour
{
[Header("Ability Identification")]
[SerializeField] private Image abilityIcon;
[SerializeField] private TextMeshProUGUI abilityName;
[Header("Ability Stats")]
[SerializeField] private TextMeshProUGUI damage;
[SerializeField] private TextMeshProUGUI fireRate;
[SerializeField] private TextMeshProUGUI piercing;
[SerializeField] private TextMeshProUGUI projectileCount;
[Header("Upgrades")]
[SerializeField] private List<Transform> upgradeBoxes = new();
public void UpdateUI(PlayerAbility ability)
{
abilityIcon.sprite = ability.abilityIcon;
abilityName.text = ability.abilityName;
damage.text = $"Damage: {ability.power}";
fireRate.text = $"Fire rate: {ability.cooldown}s";
if (ability.TryGetComponent(out FireBullet isBullet))
{
piercing.text = $"Piercing: {isBullet.pierceAmount}";
projectileCount.text = $"Projectiles: {isBullet.projectileCount}";
}
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a75a4c92b7f4707cb82c77fef57ae2b3

View file

@ -2,10 +2,10 @@ using UnityEngine;
public class FireBullet : PlayerAbility
{
[Header("Stats")]
[Header("Projectile Stats")]
public int pierceAmount;
public float accuracy;
public float bulletLifetime;
public float damage;
public float projectileSpeed;
public enum FireMode {Angled, Offset};
@ -26,7 +26,8 @@ public class FireBullet : PlayerAbility
{
newProjectile.transform.position += new Vector3(Random.Range(-offset.x, offset.x), Random.Range(-offset.y, offset.y));
}
newProjectile.damage = damage;
newProjectile.pierceAmount = pierceAmount;
newProjectile.damage = power;
newProjectile.speed = projectileSpeed;
newProjectile.lifetime = bulletLifetime;
newProjectile.transform.Rotate(0, 0, Random.Range(-accuracy, accuracy));

View file

@ -5,11 +5,14 @@ public class PlayerAbility : MonoBehaviour
{
[Header("Identification")]
public string abilityName;
public Sprite abilityIcon;
public Marisa thisPlayer;
[Header("Cooldown")]
public bool canCooldown = true;
public float cooldown;
private float currentCooldown;
[Header("Stats")]
public float power;
public void TryAbility()
{