client jump btree startint methods
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2024-07-31 17:33:59 -04:00
parent 8d6b4f71b8
commit 335ead8341
2 changed files with 26 additions and 2 deletions

View File

@ -21,7 +21,12 @@ import electrosphere.net.synchronization.annotation.SynchronizableEnum;
import electrosphere.net.synchronization.annotation.SynchronizedBehaviorTree;
import electrosphere.renderer.actor.Actor;
@SynchronizedBehaviorTree(name = "clientJumpTree", isServer = false, correspondingTree="serverJumpTree")
@SynchronizedBehaviorTree(
name = "clientJumpTree",
isServer = false,
correspondingTree = "serverJumpTree",
genStartInt = true
)
/*
Behavior tree for jumping
*/
@ -75,7 +80,7 @@ public class ClientJumpTree implements BehaviorTree {
SynchronizationMessage.constructClientRequestBTreeActionMessage(
Globals.clientSceneWrapper.mapClientToServerId(parent.getId()),
BehaviorTreeIdEnums.BTREE_CLIENTGROUNDMOVEMENTTREE_ID,
1
0
)
);
}
@ -278,4 +283,20 @@ public class ClientJumpTree implements BehaviorTree {
this.currentJumpForce = currentJumpForce;
}
/**
* <p> Automatically generated </p>
* <p>
* Requests that the server start this btree
* </p>
*/
public void interrupt(){
Globals.clientConnection.queueOutgoingMessage(
SynchronizationMessage.constructClientRequestBTreeActionMessage(
Globals.clientSceneWrapper.mapClientToServerId(parent.getId()),
BehaviorTreeIdEnums.BTREE_CLIENTGROUNDMOVEMENTTREE_ID,
1
)
);
}
}

View File

@ -21,5 +21,8 @@ public @interface SynchronizedBehaviorTree {
//The corresponding behavior tree. If this is a server tree, it is the corresponding client tree. If this is a client tree, it is the corresponding server tree
public String correspondingTree() default "";
//If true, auto generation tooling will generate start() and interrupt() methods for this tree. SHOULD ONLY BE USED ON CLIENT
public boolean genStartInt() default false;
}