feat: add test shurken

This commit is contained in:
Chris
2026-01-10 21:03:49 -05:00
parent 49862b5de1
commit cfc0096902
40 changed files with 1262 additions and 221 deletions

View File

@@ -1,30 +1,45 @@
using System;
using Drawing;
using NodeCanvas.StateMachines;
using Reset.Core;
using Reset.Units;
using UnityEngine;
namespace Reset.Items{
[CreateAssetMenu(menuName = "Reset/Weapon", fileName = "New Weapon")]
public class Weapon : Item, IEquipable{
public CombatType combatType;
public GameObject weaponModel;
public NodeCanvas.Framework.Graph weaponFSM;
public Vector3 handPositionOffset;
public Vector3 handRotationOffset;
void Awake(){
}
public string actorScriptName;
public void AddActorScript(){
// Type actorScript = Type.GetType("ShurikenActor");
//
// if (actorScript == null) {
// Debug.LogError($"The WeaponActor supplied was not found for {itemName}. Does script named '{actorScriptName + ",Assembly-UnityScript"}' exist?");
// return;
// }
WeaponActor weaponActor = PlayerManager.Player.AddComponent<ShurikenActor>() as WeaponActor;
weaponActor.relatedObject = PlayerManager.Player.GetComponent<PlayerInventory>().GetCurrentWeaponItem();
weaponActor.relatedWeapon = this;
}
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);
}
}
}