shuriken can now be thrown jumping animtions jumping animations timing state machine changes start of online integration
35 lines
890 B
C#
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;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|