dev #23
16
game/player/StateMachine/MountedState.gd
Normal file
16
game/player/StateMachine/MountedState.gd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# MountedState.gd
|
||||
extends State
|
||||
|
||||
class_name MountedState
|
||||
|
||||
var state_name : String = "Mounted"
|
||||
var play_char : CharacterBody3D
|
||||
var profile : MountProfile # assigné par qui déclenche la monte, avant transitioned.emit(..., "MountedState")
|
||||
|
||||
func enter(play_char_ref : CharacterBody3D) -> void:
|
||||
play_char = play_char_ref
|
||||
play_char.move_speed = profile.mount_speed
|
||||
play_char.move_accel = profile.mount_accel
|
||||
play_char.move_deccel = profile.mount_deccel
|
||||
# instancier profile.mount_scene_override ou profile.species.model_scene,
|
||||
# le positionner, y attacher play_char selon seat_offset...
|
||||
Loading…
Reference in a new issue