Now support modular AI

This commit is contained in:
Segey Lapin
2022-01-14 22:22:25 +03:00
parent dfbd2f34a5
commit 30ac134af9
3 changed files with 433 additions and 592 deletions

View File

@@ -104,8 +104,9 @@ func update_physics(tick, delta):
# decal.global_transform.basis = Basis(normal).scaled(Vector3(scale, 1.0, scale)).rotated(normal, rot) # decal.global_transform.basis = Basis(normal).scaled(Vector3(scale, 1.0, scale)).rotated(normal, rot)
return ERR_BUSY return ERR_BUSY
func stop(tick): func stop(tick):
printerr("Why stopped?") pass
assert(false) # printerr("Why stopped?")
# assert(false)
func update(tick, delta): func update(tick, delta):
return ERR_BUSY return ERR_BUSY

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,10 @@ var equipped = false
var vjump = Vector3() var vjump = Vector3()
func update(tick, delta): func update(tick, delta):
return ERR_BUSY
func update_physics(tick, delta):
if !controls.is_gui: if !controls.is_gui:
if !attack: if !attack:
if Input.is_action_just_pressed("attack"): if Input.is_action_just_pressed("attack"):
@@ -28,10 +32,6 @@ func update(tick, delta):
if Input.is_action_just_pressed("jump"): if Input.is_action_just_pressed("jump"):
jump = true jump = true
vjump = Vector3.UP * 10.0 vjump = Vector3.UP * 10.0
return ERR_BUSY
func update_physics(tick, delta):
var orientation: Transform var orientation: Transform
var root = get_character(tick) var root = get_character(tick)
if !root.has_meta("cam"): if !root.has_meta("cam"):