19 lines
406 B
GDScript
19 lines
406 B
GDScript
class_name CPUController extends BaseController
|
|||
|
|
|
||
|
|
|
||
|
|
func _controller_message(_event: BaseEvent) -> void:
|
||
|
|
pass
|
||
|
|
|
||
|
|
|
||
|
|
func _process(_delta: float) -> void:
|
||
|
|
if not jets_collection: return
|
||
|
|
|
||
|
|
for jet: Jet in jets_collection.get_children():
|
||
|
|
if jet.controller.control_mode == Globals.ControlMode.PLAYER_MODE:
|
||
|
|
continue
|
||
|
|
|
||
|
|
set_jet_action(jet)
|
||
|
|
|
||
|
|
func set_jet_action(jet: Jet) -> void:
|
||
|
|
jet.controller.cpu.yaw_left()
|