Files
project-reset/Assets/Scripts/Items/Weapon.cs
Chris 96c43c6369 feat: better state handling for combat
melee weapon now spawns in hand
melee substate cleaned up to work with above
added new playerinventory script on player
added new playeranimation script on player
changed inventory to IInventory
animations tweaked to avoid a lockout
2026-01-08 01:22:45 -05:00

30 lines
850 B
C#

using System;
using Drawing;
using NodeCanvas.StateMachines;
using Reset.Units;
using UnityEngine;
namespace Reset.Items{
[CreateAssetMenu(menuName = "Reset/Weapon", fileName = "New Weapon")]
public class Weapon : Item, IEquipable{
public GameObject weaponModel;
public NodeCanvas.Framework.Graph weaponFSM;
public Vector3 handPositionOffset;
public Vector3 handRotationOffset;
void Awake(){
}
public override void DrawItemInfo(Vector3 position){
Debug.Log("hiuh");
Draw.ingame.Label2D(position + Vector3.up * 1.6f, "Damage goes here");
Draw.ingame.Label2D(position + Vector3.up * 1.35f, "Speed goes here");
}
public GameObject PlaceInHand(){
return GameObject.Instantiate(weaponModel);
}
}
}