Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix warnings #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
.DS_Store
.#*
*~
*.import
12 changes: 5 additions & 7 deletions addons/godot-behavior-tree-plugin/bt_base.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func _enter(tick):
enter(tick)

func _open(tick):
print("opening node")
tick.openNode(self)
tick.blackboard.set('isOpen', true, tick.tree, self)
open(tick)
Expand All @@ -30,7 +29,6 @@ func _tick(tick):
return tick(tick)

func _close(tick):
print("closing node")
tick.closeNode(self)
tick.blackboard.set('isOpen', false, tick.tree, self)
close(tick)
Expand All @@ -40,17 +38,17 @@ func _exit(tick):
exit(tick)

#the following functions are to be overridden in extending nodes
func enter(tick):
func enter(_tick):
pass

func open(tick):
func open(_tick):
pass

func tick(tick):
func tick(_tick):
return OK

func close(tick):
func close(_tick):
pass

func exit(tick):
func exit(_tick):
pass
6 changes: 3 additions & 3 deletions addons/godot-behavior-tree-plugin/tick.gd
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ func _init():
actor = null
blackboard = []

func openNode(node):
func openNode(_node):
pass

func enterNode(node):
openNodes.push_back(node)

func tickNode(node):
func tickNode(_node):
pass

func closeNode(node):
if(openNodes.has(node)):
openNodes.remove(openNodes.find(node))

func exitNode(node):
func exitNode(_node):
pass