the scarlet police have me at gun point

This commit is contained in:
Sylvia 2026-03-06 02:22:51 -08:00
parent b964c9b617
commit d6da52fd69
54 changed files with 674 additions and 55 deletions

View file

@ -25,6 +25,8 @@ public class FireBullet : PlayerAbility
{
newProjectile.transform.position += new Vector3(Random.Range(-offset.x, offset.x), Random.Range(-offset.y, offset.y));
}
newProjectile.owner = thisPlayer;
newProjectile.pierceAmount = pierceAmount;
newProjectile.damage = power;
newProjectile.speed = projectileSpeed;

View file

@ -55,7 +55,7 @@ public class Laser : PlayerAbility
enemyList.Remove(enemy);
continue;
}
enemy.TakeDamage(power);
enemy.TakeDamage(power, thisPlayer);
}
currentDebounce = damageDebounceTime;
}

View file

@ -37,7 +37,7 @@ public class NondirectionalLaser : Laser
enemyList.Remove(enemy);
continue;
}
enemy.TakeDamage(power);
enemy.TakeDamage(power, thisPlayer);
}
currentDebounce = damageDebounceTime;
}

View file

@ -10,13 +10,23 @@ public class PlayerAbility : MonoBehaviour
public Marisa thisPlayer;
[Header("Cooldown")]
public bool canCooldown = true;
public float baseCooldown;
public float cooldown;
public float currentCooldown;
[Header("Stats")]
[Header("Stats")]
public float basePower;
public float power;
public float baseProjectileCount;
public float projectileCount;
public Dictionary<AbilityUpgrade, int> attachedUpgrades = new();
private void Start()
{
cooldown = baseCooldown;
power = basePower;
projectileCount = baseProjectileCount;
}
public void TryAbility()
{
if (currentCooldown <= 0 && canCooldown)

View file

@ -5,8 +5,8 @@ public class AbilityUpgrade : ScriptableObject
[Header("Identification")]
public string upgradeName;
public Sprite upgradeIcon;
[Header("Stats")]
public PlayerAbility thisPlayerAbility;
[Header("Stats")]
[SerializeField] private string hi; //never use this lol it's just for the header
public void ApplyUpgrade(PlayerAbility abilityToUpgrade)
{

View file

@ -1,11 +0,0 @@
using UnityEngine;
public class AttackSpeedUpgrade : AbilityUpgrade
{
[SerializeField] private float speedUpgradeAmount;
protected override void UpgradeEffects(PlayerAbility abilityToUpgrade)
{
thisPlayerAbility.cooldown *= speedUpgradeAmount;
}
}

View file

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 8cf716a335ed64e9c9c64a9e934acbd8

View file

@ -0,0 +1,13 @@
using System;
using UnityEngine;
[CreateAssetMenu(fileName = "Cooldown Upgrade", menuName = "AbilityUpgrades/CooldownUpgrade")]
public class CooldownUpgrade : AbilityUpgrade
{
[SerializeField] private float cooldownDifference;
protected override void UpgradeEffects(PlayerAbility abilityToUpgrade)
{
abilityToUpgrade.cooldown = abilityToUpgrade.baseCooldown * ((float)Math.Pow(cooldownDifference, abilityToUpgrade.attachedUpgrades[this])); //almost forgot my math there...
}
}

View file

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

View file

@ -5,6 +5,7 @@ public class ProjectileCountUpgrade : AbilityUpgrade
{
protected override void UpgradeEffects(PlayerAbility abilityToUpgrade)
{
abilityToUpgrade.projectileCount++; //idk how this will work for the stacking.
abilityToUpgrade.projectileCount =
abilityToUpgrade.baseProjectileCount + abilityToUpgrade.attachedUpgrades[this];
}
}