proto3 initial commit
This commit is contained in:
16
proto3/godot/ai/selector.gd
Normal file
16
proto3/godot/ai/selector.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
extends BTBase
|
||||
class_name BTSelector
|
||||
|
||||
func tick(tick: Tick) -> int:
|
||||
|
||||
var result := OK #if we have no children, assume success
|
||||
|
||||
for child in get_children():
|
||||
var _result = child._execute(tick)
|
||||
assert(typeof(_result) == TYPE_INT)
|
||||
result = _result
|
||||
|
||||
if not result == FAILED:
|
||||
break
|
||||
|
||||
return result
|
||||
Reference in New Issue
Block a user