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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user