Files
project-reset/Assets/Scripts/Units/PlayerInventory.cs
Chris 25b7fae339 feat: more combat tweaks
shuriken can now be thrown
jumping animtions
jumping animations timing
state machine changes
start of online integration
2026-01-15 14:42:33 -05:00

35 lines
890 B
C#

using System.Collections.Generic;
using Reset.Items;
using UnityEngine;
namespace Reset.Units{
public class PlayerInventory : UnitComponent, IInventory{
public Weapon rangedWeapon;
public Weapon meleeWeapon;
public Ability spellAbility1;
public Ability spellAbility2;
public Ability toolAbility1;
public Ability toolAbility2;
public List<Item> storedItems{ get; set; }
public void EquipToCharacter(Item item){
if (item is not IEquipable) {
Debug.LogError("This item is not equippable.", item);
return;
}
if (item is Weapon thisWeapon) {
if (meleeWeapon != null) {
storedItems.Add(meleeWeapon);
}
meleeWeapon = thisWeapon;
}
}
}
}