alotta upgrade stuff but no upgrades

This commit is contained in:
myondev 2026-02-23 06:26:50 -08:00
parent b9fb490dce
commit 3b60583c76
35 changed files with 2937 additions and 61 deletions

View file

@ -24,6 +24,8 @@ public class Enemy : Entity
}
[Header("Drops")]
public List<UpgradeDrop> possibleDrops = new();
[SerializeField] private UpgradePickup pickupObject;
private void Start()
{
if (Random.Range(0f, 2f) > 1f)
@ -82,7 +84,8 @@ public class Enemy : Entity
{
if (random < drop.chance) //just so it matches up with the number. 80 chance means 80 percent? idk but less than 80 lol
{
// drop the item
UpgradePickup newPickup = Instantiate(pickupObject, transform.position, Quaternion.identity);
newPickup.upgradeDropped = drop.droppedUpgrade;
}
}
}

View file

@ -18,16 +18,27 @@ public class MarisaAbilityHandler : MonoBehaviour
public PlayerAbility spellAInstance;
public PlayerAbility spellBInstance;
[Header("UI")]
public AbilityHotbarIcon mainIcon;
public AbilityHotbarIcon secondaryIcon;
public AbilityHotbarIcon spellAIcon;
public AbilityHotbarIcon spellBIcon;
//this is getting ridiculous
private void Awake()
{
mainAttackInstance = Instantiate(mainAttack, transform);
mainAttackInstance.thisPlayer = thisPlayer;
mainIcon.UpdateAbility(mainAttackInstance);
secondaryAttackInstance = Instantiate(secondaryAttack, transform);
secondaryAttackInstance.thisPlayer = thisPlayer;
secondaryIcon.UpdateAbility(secondaryAttackInstance);
spellAInstance = Instantiate(spellA, transform);
spellAInstance.thisPlayer = thisPlayer;
spellAIcon.UpdateAbility(spellAInstance);
spellBInstance = Instantiate(spellB, transform);
spellBInstance.thisPlayer = thisPlayer;
spellBIcon.UpdateAbility(spellBInstance);
}
private void Update()
@ -35,18 +46,22 @@ public class MarisaAbilityHandler : MonoBehaviour
if (inputHandler.actions["MainAttack"].inProgress)
{
mainAttackInstance.TryAbility();
mainIcon.UpdateCooldown();
}
else if (inputHandler.actions["SecondaryAttack"].inProgress)
{
secondaryAttackInstance.TryAbility();
secondaryIcon.UpdateCooldown();
}
else if (inputHandler.actions["SpellA"].inProgress)
{
spellAInstance.TryAbility();
spellAIcon.UpdateCooldown();
}
else if (inputHandler.actions["SpellB"].inProgress)
{
spellBInstance.TryAbility();
spellBIcon.UpdateCooldown();
}
}
}