maint: clean-up of some combat related classes and methods for clarity

This commit is contained in:
Chris
2025-10-23 13:04:56 -04:00
parent eb1622d4ed
commit a83ab1156a
13 changed files with 135 additions and 527 deletions

View File

@@ -21,21 +21,15 @@ namespace NodeCanvas.Tasks.Actions {
//Call EndAction() to mark the action as finished, either in success or failure.
//EndAction can be called from anywhere.
protected override void OnExecute(){
// using (Draw.WithColor(Color.forestGreen)){
// EndAction(true);
// }
}
//Called once per frame while the action is active.
protected override void OnUpdate(){
agent.GetComponent<Player>().persistDrawingRevive = .5f;
agent.GetComponent<Player>().persistDrawingRevive = 1f;
agent.GetComponent<Player>().DrawReviveBarRpc(elapsedTime);
}
//Called when the task is disabled.
protected override void OnStop() {

View File

@@ -10,8 +10,6 @@ namespace Reset.Core {
public class IsInteractable : ConditionTask{
public BBParameter<GameObject> target;
protected override string info{
get{
// string agentName = agent == null ? agentType.ToString() : target.ToString();
return $"<b>{target.ToString()}</b> is interactable";
@@ -37,7 +35,7 @@ namespace Reset.Core {
//Called once per frame while the condition is active.
//Return whether the condition is success or failure.
protected override bool OnCheck(){
IInteractable interactable = agent.GetComponent<IInteractable>();
IInteractable interactable = target.value.GetComponent<IInteractable>();
if (interactable == null) {
return false;

View File

@@ -5,9 +5,7 @@ using Unity.Netcode;
using Unity.Netcode.Components;
using UnityEngine;
namespace Reset.Core {
[Category("Reset")]
[Description("Sends an animation trigger with network sync to networked objects")]
public class SendAnimationTrigger : ActionTask<NetworkAnimator>{

View File

@@ -7,7 +7,7 @@ using UnityEngine;
namespace Reset.Units {
[Category("Reset")]
[Description("Send a string as an event to another unit. Works online as well")]
[Description("Send a graph event to another unit. Works online as well")]
public class SendEventToUnit : ActionTask<Unit>{
public BBParameter<GameObject> target;
public string eventToSend;