extends Node # ----------------------------------------------------------------------------------------------- # ## Ground move served out by the player move repository var ground_move : Move ## Air move served out by the player move repository var air_move : Move ## Dash move served out by the player move repository var dash_move : Move ## Squat move served out by the player move repository var squat_move : Move ## Slide move served out by the player move repository var slide_move : Move # ----------------------------------------------------------------------------------------------- # ## Switches the actor controller to the ground move ## @param impact_velocity Velocity the actor had when hitting the ground func get_ground_move(impact_velocity : float): if ground_move == null: ground_move = load( "res://Framework/Platformer/Code/PlayerMoves/PlatformerPlayerGroundMove.gd" ).new() ground_move.impact_velocity = impact_velocity return ground_move # ----------------------------------------------------------------------------------------------- # ## Switches the actor controller to the air move ## @param jumped Whether the character has jumped (false: actor just fell) func get_air_move(jumped : bool): if air_move == null: air_move = load( "res://Framework/Platformer/Code/PlayerMoves/PlatformerPlayerAirMove.gd" ).new() air_move.jumped = jumped return air_move # ----------------------------------------------------------------------------------------------- # ## Switches the actor controller to the dash move func get_dash_move(): if dash_move == null: dash_move = load( "res://Framework/Platformer/Code/PlayerMoves/PlatformerPlayerDashMove.gd" ).new() return dash_move # ----------------------------------------------------------------------------------------------- # ## Switches the actor controller to the squat move func get_squat_move(): if squat_move == null: squat_move = load( "res://Framework/Platformer/Code/PlayerMoves/PlatformerPlayerSquatMove.gd" ).new() return squat_move # ----------------------------------------------------------------------------------------------- # ## Switches the actor controller to the squat move func get_slide_move(): if slide_move == null: slide_move = load( "res://Framework/Platformer/Code/PlayerMoves/PlatformerPlayerSlideMove.gd" ).new() return slide_move