feat: more combat tweaks

shuriken can now be thrown
jumping animtions
jumping animations timing
state machine changes
start of online integration
This commit is contained in:
Chris
2026-01-15 14:42:25 -05:00
parent a06784f7b6
commit 25b7fae339
45 changed files with 28662 additions and 250 deletions

View File

@@ -1,8 +1,11 @@
using System;
using Drawing;
using NodeCanvas.StateMachines;
using NodeCanvas.Framework;
using Reset.Core;
using Reset.Units;
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using Unity.Netcode;
using UnityEngine;
namespace Reset.Items{
@@ -18,6 +21,8 @@ namespace Reset.Items{
public string actorScriptName;
[OdinSerialize, ShowInInspector] public Type actorScript;
public void AddActorScript(){
// Type actorScript = Type.GetType("ShurikenActor");
//
@@ -26,10 +31,17 @@ namespace Reset.Items{
// return;
// }
WeaponActor weaponActor = PlayerManager.Player.AddComponent<ShurikenActor>() as WeaponActor;
weaponActor.relatedObject = PlayerManager.Player.GetComponent<PlayerInventory>().GetCurrentWeaponItem();
weaponActor.relatedWeapon = this;
try {
if (actorScript != null) {
WeaponActor weaponActor = PlayerManager.Player.AddComponent(actorScript) as WeaponActor;
weaponActor.relatedObject = PlayerManager.Player.GetComponent<PlayerCombat>().GetCurrentWeaponItem();
weaponActor.relatedWeapon = this;
weaponActor.relatedGraph = PlayerManager.Player.GetComponent<GraphOwner>();
}
} catch (Exception e) {
Debug.LogException(e);
}
}
public override void DrawItemInfo(Vector3 position){
@@ -37,9 +49,10 @@ namespace Reset.Items{
Draw.ingame.Label2D(position + Vector3.up * 1.35f, "Speed goes here");
}
public GameObject PlaceInHand(){
return GameObject.Instantiate(weaponModel);
public GameObject InstantiateItemObject(){
return GameObject.Instantiate(weaponModel);
}
}
}