33 lines
518 B
GDScript
33 lines
518 B
GDScript
#@tool
|
|
#@icon(icon_path: String)
|
|
class_name Boat
|
|
extends RigidBody2D
|
|
## Documentation comments
|
|
|
|
#signal
|
|
#enum
|
|
#const
|
|
@export var movement_speed: float = 10.0
|
|
#var
|
|
#@onready var
|
|
@onready var right_cast: RayCast2D = %RightCast
|
|
@onready var left_cast: RayCast2D = %LeftCast
|
|
|
|
## OVERRIDES
|
|
|
|
func _ready() -> void:
|
|
pass
|
|
|
|
func _process(_delta: float) -> void:
|
|
pass
|
|
|
|
func _physics_process(delta: float) -> void:
|
|
apply_central_force(Vector2(movement_speed, 0.0))
|
|
## CORE
|
|
|
|
## PRIVATE/HELPER
|
|
|
|
## RECEIVERS
|
|
|
|
## SETTERS/GETTERS
|