literally half of the game

This commit is contained in:
Sylvia 2026-08-27 04:07:01 -07:00
parent 1590b5faa6
commit b842289076
77 changed files with 11904 additions and 72 deletions

View file

@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.LowLevel;
public class Player : CombatEntity
{
@ -11,7 +13,10 @@ public class Player : CombatEntity
{
//moveAction = InputSystem.actions.FindAction("Move");
}*/
[Header("Abilities")]
public bool abilitiesDisabled;
public List<PlayerAbility> abilities = new();
protected override void Movement()
{
base.Movement();
@ -19,4 +24,20 @@ public class Player : CombatEntity
//moveDirection = moveAction.ReadValue<Vector2>();
moveDirection = new Vector3(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"), 0);
}
private void Update()
{
foreach (PlayerAbility ability in abilities)
{
if (Input.GetKeyDown(ability.inputKey))
{
ability.TryAbility();
}
else if (ability.inputKey == KeyCode.None && Input.GetMouseButtonDown((int)ability.mouseButton))
{
//really needs to be fixed to the new input system
ability.TryAbility();
}
}
}
}