BEHOLD, MY SUPER LASER PISS
This commit is contained in:
parent
084aada510
commit
e29208a2e5
23 changed files with 760 additions and 20 deletions
|
|
@ -1,6 +1,52 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class MarisaAbilityHandler : MonoBehaviour
|
||||
{
|
||||
|
||||
[SerializeField] private PlayerInput inputHandler;
|
||||
[SerializeField] private Marisa thisPlayer;
|
||||
[Header("Abilities")] //maybe have to make them public for when you're changing out abilities
|
||||
[SerializeField] private PlayerAbility mainAttack;
|
||||
[SerializeField] private PlayerAbility secondaryAttack;
|
||||
[SerializeField] private PlayerAbility spellA;
|
||||
[SerializeField] private PlayerAbility spellB;
|
||||
|
||||
[Header("Ability Instances")]
|
||||
public PlayerAbility mainAttackInstance;
|
||||
public PlayerAbility secondaryAttackInstance;
|
||||
public PlayerAbility spellAInstance;
|
||||
public PlayerAbility spellBInstance;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
mainAttackInstance = Instantiate(mainAttack, transform);
|
||||
mainAttackInstance.thisPlayer = thisPlayer;
|
||||
secondaryAttackInstance = Instantiate(secondaryAttack, transform);
|
||||
secondaryAttackInstance.thisPlayer = thisPlayer;
|
||||
spellAInstance = Instantiate(spellA, transform);
|
||||
spellAInstance.thisPlayer = thisPlayer;
|
||||
spellBInstance = Instantiate(spellB, transform);
|
||||
spellBInstance.thisPlayer = thisPlayer;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (inputHandler.actions["MainAttack"].inProgress)
|
||||
{
|
||||
mainAttackInstance.TryAbility();
|
||||
}
|
||||
else if (inputHandler.actions["SecondaryAttack"].inProgress)
|
||||
{
|
||||
secondaryAttackInstance.TryAbility();
|
||||
}
|
||||
else if (inputHandler.actions["SpellA"].inProgress)
|
||||
{
|
||||
spellAInstance.TryAbility();
|
||||
}
|
||||
else if (inputHandler.actions["SpellB"].inProgress)
|
||||
{
|
||||
spellBInstance.TryAbility();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue