Most of prototype! yay
This commit is contained in:
16
common/player_states/player_state_rotation_interaction.gd
Normal file
16
common/player_states/player_state_rotation_interaction.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
extends Player_State
|
||||
class_name Player_State_Rotation_Interaction
|
||||
|
||||
var rotation_target: Node2D
|
||||
|
||||
func _init(target: Node2D) -> void:
|
||||
rotation_target = target
|
||||
|
||||
func restrict_rotation() -> bool:
|
||||
return true
|
||||
|
||||
func on_movement_input(input: Vector2, player: Player):
|
||||
player.interacting_state = Player_State_Standard.new()
|
||||
|
||||
func on_rotation_input(input: float, player: Player):
|
||||
rotation_target.rotation = input
|
||||
Reference in New Issue
Block a user