From b94760ffe1b016f372516309ad7033549a18aaca Mon Sep 17 00:00:00 2001 From: AleaJactaEst Date: Fri, 13 May 2022 22:02:54 +0200 Subject: [PATCH] adding joypad --- locales/en.po | 24 +++++++ locales/fr.po | 24 +++++++ locales/messages.mo | Bin 5499 -> 5539 bytes locales/messages.pot | 34 +++++++++ player/player.gd | 14 +++- scenes/controls/controls.gd | 28 ++++++++ scenes/controls/controls.tscn | 130 +++++++++++++++++++++++++++++++--- scripts/common.gd | 37 ++++++++++ 8 files changed, 279 insertions(+), 12 deletions(-) diff --git a/locales/en.po b/locales/en.po index 7aaf9b6..1f01158 100644 --- a/locales/en.po +++ b/locales/en.po @@ -301,3 +301,27 @@ msgstr "Reverse vertical" msgid "NO_MOUSE_BUTTON" msgstr "Nothing" + +msgid "INPUT_VIEW_CAMERA_LEFT_JOYPAD" +msgstr "Camera Left (Joypad)" + +msgid "INPUT_VIEW_CAMERA_RIGHT_JOYPAD" +msgstr "Camera Right (Joypad)" + +msgid "INPUT_VIEW_CAMERA_FORWARD_JOYPAD" +msgstr "camera Up (Joypad)" + +msgid "INPUT_VIEW_CAMERA_BACK_JOYPAD" +msgstr "Camera Down (Joypad)" + +msgid "INPUT_ACTION_PLAYER_LEFT_JOYPAD" +msgstr "Move Left (Joypad)" + +msgid "INPUT_ACTION_PLAYER_RIGHT_JOYPAD" +msgstr "Move Right (Joypad)" + +msgid "INPUT_ACTION_PLAYER_FORWARD_JOYPAD" +msgstr "Move Up (Joypad)" + +msgid "INPUT_ACTION_PLAYER_BACK_JOYPAD" +msgstr "Move Down (Joypad)" diff --git a/locales/fr.po b/locales/fr.po index 57a6a18..3ba85c0 100644 --- a/locales/fr.po +++ b/locales/fr.po @@ -301,3 +301,27 @@ msgstr "Inversé verticale" msgid "NO_MOUSE_BUTTON" msgstr "Rien n'est sélectionné" + +msgid "INPUT_VIEW_CAMERA_LEFT_JOYPAD" +msgstr "Caméra à gauche (Manette)" + +msgid "INPUT_VIEW_CAMERA_RIGHT_JOYPAD" +msgstr "Caméra à droite (Manette)" + +msgid "INPUT_VIEW_CAMERA_FORWARD_JOYPAD" +msgstr "Caméra en haut (Manette)" + +msgid "INPUT_VIEW_CAMERA_BACK_JOYPAD" +msgstr "Caméra en bas (Manette)" + +msgid "INPUT_ACTION_PLAYER_LEFT_JOYPAD" +msgstr "Déplacer à gauche (Manette)" + +msgid "INPUT_ACTION_PLAYER_RIGHT_JOYPAD" +msgstr "Déplacer à droite (Manette)" + +msgid "INPUT_ACTION_PLAYER_FORWARD_JOYPAD" +msgstr "Déplacer en haut (Manette)" + +msgid "INPUT_ACTION_PLAYER_BACK_JOYPAD" +msgstr "Déplacer en bas (Manette)" diff --git a/locales/messages.mo b/locales/messages.mo index 57be303ae684724896fc9ea9f4ced7bdc0d7e92f..2b2166a47c53e7a946ca8d110ffa80060b7f984a 100644 GIT binary patch delta 1920 zcmXxkSx8h-9LMp$r8AkPwwjq`X_Sr?Qc+gYs?p|>wyR}e6t<8AN)SU667*ou6z$Lg zLDE7P6%s@X5=bvS_|ihO5k*wcL(xLt-}v`1|NA-T-gD3LzxU4X{7a$mt0D2njZ#mH zCUX0m9mIkF2glfWyIE;Q>I251b5VNp-r80^W z{SwX6F$*(r29CsXZ*Rllv?K0G)Pk?0*4m9Be1>`W54FHa1I@AZxJ;sGYX^`MZApA@Z|s4%$f%j>XS70h36RCM-lvv`#`nYxL}TqkPc$L?!X2L7P#PfzJJ-z`Qhpdy9* ztJ1&;O|TCWu+2S&THtByhwZ3=uim3+@T2Kb+S?8eo%|^Y1rQY6x+-kc}&;9`F zT{(*r@gBy$|94b0;CJ^o@=03)d6H?UOk}z_s0D_+J>A=LQR9@LQd{oUqBhWo%1Dd5 zU+VjhP*ExmxoxNcj-xVj$-RPF$PH8`?x61L#B6+k%E%kkPJf~LW$;aF0i#jl<)I$= zRMh)t3#e#iRmeTI&fST+F@jpq5!3+ZkdGl&)^k*v3y54|4l$jmA(VE#6Z42QL=iE8 zPze$BX3JtJ(}~rDCYz}SWdosaTxD`EwhBv$#on&NF@$!#GI}l0*ib=jGtpO8P*E;a zw6!W?7Ewm@mGZs{784u2y$<Er@Jf}X@WmCi4guEG8qYpkZj^DNJQfMZBI|`@A;hbJm);;oZs_2w>$N| zs^R{K+@pcAi5O!H2w|TlI8Y|%g)kVW;1K)*KgD_+jw^5&ZtnV~FztyW@xpIdMEegc z#A`SLAK++wiN!c1KZH`O#1gEH?X@_P_Ri>jbb%+(wOzy%Uco8&EI*`sS5z`6gmO+) zp%X1dCvHPmz6Ti-I*~PmE_7$V#`9<5`SZvxT;$+J{=(1k9#-Oebi?JO$9ZN9PKQuH zrI8a}XpQbb7qAb#{tLRZ)98+S&2lR--6g~!7|z%=!Uz}R4S-s zu?p{^DIUP~+(8*SK@GZ)uhE69M1G--gA46IAK8A)#p7tEPNJDRhfe%^^d_2t^nX;m zL2_uHqtS`0qjl(w*Wf^GkM2MhwhKSOPV|NcaXg+vQ-2lR=@T>~gBWB+%KJ=*xl|n3 zgr;^ox`PAgLViYmp_>EA30Y*#;S%~%-N0l{2)B`^5dI}iUVn=Ae~UiaTn=;zqtJ{@ z?3L$VLxnFW%!$rNZ(N7&xB*?za`eWl(9~{5Cum3e|A1!7Ps;0==y7!1DYRb}&G-c@ zVE%BOiWA&Ncl-z)@DBNf1ic+l!odZlFp1OAoy?Bs>(To(pc6I5>rFV8b}RZ7>_z)^ zW7?PM3>7o*XS~o8y@F2ocf5Wb-PtWP)&HOwc#OUSuh0d(L7%nhuwOCy@=b{CTBJ)@ zQpor3vv1*qFUxM6gvZbuUq)|uBYGG4gu}z=|7a%OMNOXz%tOx)kL^n6$dA#V(1|+H3>-$s9l>#U49&y^bc46helO5@U#F>f z!yGVHNvtQ#w(mkM(L`*V z&7qR8q=-#~sj{phoa{>*ly!vPwxzm{uo4#$3u1dCenzI{@+ diff --git a/locales/messages.pot b/locales/messages.pot index 34baf9b..c09205a 100644 --- a/locales/messages.pot +++ b/locales/messages.pot @@ -293,5 +293,39 @@ msgstr "" msgid "NO_MOUSE_BUTTON" msgstr "" +msgid "INPUT_VIEW_CAMERA_LEFT_JOYPAD" +msgstr "" +msgid "INPUT_VIEW_CAMERA_RIGHT_JOYPAD" +msgstr "" + +msgid "INPUT_VIEW_CAMERA_FORWARD_JOYPAD" +msgstr "" + +msgid "INPUT_VIEW_CAMERA_BACK_JOYPAD" +msgstr "" + +msgid "INPUT_ACTION_PLAYER_LEFT_JOYPAD" +msgstr "" + +msgid "INPUT_ACTION_PLAYER_RIGHT_JOYPAD" +msgstr "" + +msgid "INPUT_ACTION_PLAYER_FORWARD_JOYPAD" +msgstr "" + +msgid "INPUT_ACTION_PLAYER_BACK_JOYPAD" +msgstr "" + +msgid "FACTOR_CAMERA_HORIZONTALE_JOYPAD" +msgstr "" + +msgid "FACTOR_CAMERA_VERTICALE_JOYPAD" +msgstr "" + +msgid "FACTOR_PLAYER_HORIZONTALE_JOYPAD" +msgstr "" + +msgid "FACTOR_PLAYER_VERTICALE_JOYPAD" +msgstr "" diff --git a/player/player.gd b/player/player.gd index ea06679..1ba8929 100644 --- a/player/player.gd +++ b/player/player.gd @@ -793,6 +793,15 @@ func rotate_camera_y(angle_y): detect_camera_collision_y(-angle_y) +func rotate_player(angle_x, angle_y): + player_rotate_y += angle_y + if player_rotate_y > PI: + player_rotate_y -= TAU + elif player_rotate_y <= -PI: + player_rotate_y += TAU + rotate_y( -angle_y ) + + func move_camera(angle_x, angle_y): var new_camera_rotate_x = camera_rotate_x + angle_x if angle_x != 0.0 and new_camera_rotate_x <= PI_2 and new_camera_rotate_x >= - PI_2: @@ -943,7 +952,10 @@ func _process( delta ): # Joypad if tps: var move_camera:Vector2 = Input.get_vector("INPUT_VIEW_CAMERA_LEFT_JOYPAD", "INPUT_VIEW_CAMERA_RIGHT_JOYPAD", "INPUT_VIEW_CAMERA_FORWARD_JOYPAD", "INPUT_VIEW_CAMERA_BACK_JOYPAD") - move_camera(move_camera.y * 0.04, move_camera.x * 0.04) + move_camera(move_camera.y * Common.get_factor_camera_verticale_joypad() * delta, move_camera.x * Common.get_factor_camera_horizontale_joypad() * delta) + var player_joypad:Vector2 = Input.get_vector("INPUT_ACTION_PLAYER_LEFT_JOYPAD", "INPUT_ACTION_PLAYER_RIGHT_JOYPAD", "INPUT_ACTION_PLAYER_FORWARD_JOYPAD", "INPUT_ACTION_PLAYER_BACK_JOYPAD") + #rotate_player(player_joypad.y * Common.get_factor_player_verticale_joypad() * delta, player_joypad.x * Common.get_factor_player_horizontale_joypad() * delta) + y += player_joypad.x * Common.get_factor_player_verticale_joypad() if offset_camera_current != offset_camera_target: var offset_diff = move_camera_y_one_step( offset_camera_target - offset_camera_current, MOVE_CAMERA_Y_OFFSET) diff --git a/scenes/controls/controls.gd b/scenes/controls/controls.gd index 3a47fad..2c8b66d 100644 --- a/scenes/controls/controls.gd +++ b/scenes/controls/controls.gd @@ -158,6 +158,14 @@ func update_joypad_motion(): $Window/v/Tab/JOYPAD/v/PlayerRight/h1/PlayerRight.set_text(Common.get_input_plus("INPUT_ACTION_PLAYER_RIGHT_JOYPAD")) $Window/v/Tab/JOYPAD/v/PlayerForward/h1/PlayerForward.set_text(Common.get_input_plus("INPUT_ACTION_PLAYER_FORWARD_JOYPAD")) $Window/v/Tab/JOYPAD/v/PlayerBack/h1/PlayerBack.set_text(Common.get_input_plus("INPUT_ACTION_PLAYER_BACK_JOYPAD")) + $Window/v/Tab/JOYPAD/v/FactorCameraHorizontale/FactorCameraHorizontale.set_value(Common.get_factor_camera_horizontale_joypad()) + $Window/v/Tab/JOYPAD/v/FactorCameraHorizontale/value.set_text(str(Common.get_factor_camera_horizontale_joypad())) + $Window/v/Tab/JOYPAD/v/FactorCameraVerticale/FactorCameraVerticale.set_value(Common.get_factor_camera_verticale_joypad()) + $Window/v/Tab/JOYPAD/v/FactorCameraVerticale/value.set_text(str(Common.get_factor_camera_verticale_joypad())) + $Window/v/Tab/JOYPAD/v/FactorPlayerHorizontale/FactorPlayerHorizontale.set_value(Common.get_factor_player_horizontale_joypad()) + $Window/v/Tab/JOYPAD/v/FactorPlayerHorizontale/value.set_text(str(Common.get_factor_player_horizontale_joypad())) + $Window/v/Tab/JOYPAD/v/FactorPlayerVerticale/FactorPlayerVerticale.set_value(Common.get_factor_player_verticale_joypad()) + $Window/v/Tab/JOYPAD/v/FactorPlayerVerticale/value.set_text(str(Common.get_factor_player_verticale_joypad())) func configure_control(): @@ -502,3 +510,23 @@ func _on_camera_player_move_reverse_horizontal_toggled(button_pressed): func _on_camera_player_move_reverse_vertical_toggled(button_pressed): Common.set_mouse_camera_player_move_reverse_vertical(button_pressed) + + +func _on_factor_camera_horizontale_value_changed(value): + $Window/v/Tab/JOYPAD/v/FactorCameraHorizontale/value.set_text(str(value)) + Common.set_factor_camera_horizontale_joypad(value) + + +func _on_factor_camera_verticale_value_changed(value): + $Window/v/Tab/JOYPAD/v/FactorCameraVerticale/value.set_text(str(value)) + Common.set_factor_camera_verticale_joypad(value) + + +func _on_factor_player_horizontale_value_changed(value): + $Window/v/Tab/JOYPAD/v/FactorPlayerHorizontale/value.set_text(str(value)) + Common.set_factor_player_horizontale_joypad(value) + + +func _on_factor_player_verticale_value_changed(value): + $Window/v/Tab/JOYPAD/v/FactorPlayerVerticale/value.set_text(str(value)) + Common.set_factor_player_verticale_joypad(value) diff --git a/scenes/controls/controls.tscn b/scenes/controls/controls.tscn index 69d1723..a2a0a60 100644 --- a/scenes/controls/controls.tscn +++ b/scenes/controls/controls.tscn @@ -244,8 +244,8 @@ offset_right = 40.0 offset_bottom = 40.0 [node name="v" type="VBoxContainer" parent="Window/v/Tab/JOYPAD"] -offset_right = 318.0 -offset_bottom = 572.0 +offset_right = 384.0 +offset_bottom = 724.0 size_flags_horizontal = 3 size_flags_vertical = 3 @@ -303,6 +303,32 @@ text = "SELECT" offset_right = 40.0 offset_bottom = 4.0 +[node name="FactorCameraHorizontale" type="HBoxContainer" parent="Window/v/Tab/JOYPAD/v"] +offset_right = 384.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="Window/v/Tab/JOYPAD/v/FactorCameraHorizontale"] +offset_right = 40.0 +offset_bottom = 23.0 +size_flags_horizontal = 3 +text = "FACTOR_CAMERA_HORIZONTALE_JOYPAD" + +[node name="FactorCameraHorizontale" type="HSlider" parent="Window/v/Tab/JOYPAD/v/FactorCameraHorizontale"] +offset_right = 8.0 +offset_bottom = 16.0 +size_flags_horizontal = 3 +max_value = 10.0 +step = 0.1 + +[node name="value" type="Label" parent="Window/v/Tab/JOYPAD/v/FactorCameraHorizontale"] +minimum_size = Vector2(50, 0) +offset_right = 40.0 +offset_bottom = 23.0 + +[node name="HSeparator3" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] +offset_right = 40.0 +offset_bottom = 4.0 + [node name="CameraForward" type="VBoxContainer" parent="Window/v/Tab/JOYPAD/v"] offset_right = 40.0 offset_bottom = 40.0 @@ -326,7 +352,7 @@ offset_right = 8.0 offset_bottom = 31.0 text = "SELECT" -[node name="HSeparator3" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] +[node name="HSeparator4" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] offset_right = 40.0 offset_bottom = 4.0 @@ -353,7 +379,33 @@ offset_right = 8.0 offset_bottom = 31.0 text = "SELECT" -[node name="HSeparator4" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] +[node name="HSeparator5" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] +offset_right = 40.0 +offset_bottom = 4.0 + +[node name="FactorCameraVerticale" type="HBoxContainer" parent="Window/v/Tab/JOYPAD/v"] +offset_right = 354.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="Window/v/Tab/JOYPAD/v/FactorCameraVerticale"] +offset_right = 40.0 +offset_bottom = 23.0 +size_flags_horizontal = 3 +text = "FACTOR_CAMERA_VERTICALE_JOYPAD" + +[node name="FactorCameraVerticale" type="HSlider" parent="Window/v/Tab/JOYPAD/v/FactorCameraVerticale"] +offset_right = 8.0 +offset_bottom = 16.0 +size_flags_horizontal = 3 +max_value = 10.0 +step = 0.1 + +[node name="value" type="Label" parent="Window/v/Tab/JOYPAD/v/FactorCameraVerticale"] +minimum_size = Vector2(50, 0) +offset_right = 40.0 +offset_bottom = 23.0 + +[node name="HSeparator6" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] offset_right = 40.0 offset_bottom = 4.0 @@ -380,7 +432,7 @@ offset_right = 8.0 offset_bottom = 31.0 text = "SELECT" -[node name="HSeparator5" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] +[node name="HSeparator7" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] offset_right = 40.0 offset_bottom = 4.0 @@ -407,13 +459,39 @@ offset_right = 8.0 offset_bottom = 31.0 text = "SELECT" -[node name="HSeparator6" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] +[node name="HSeparator8" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] +offset_right = 40.0 +offset_bottom = 4.0 + +[node name="FactorPlayerHorizontale" type="HBoxContainer" parent="Window/v/Tab/JOYPAD/v"] +offset_right = 384.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="Window/v/Tab/JOYPAD/v/FactorPlayerHorizontale"] +offset_right = 40.0 +offset_bottom = 23.0 +size_flags_horizontal = 3 +text = "FACTOR_PLAYER_HORIZONTALE_JOYPAD" + +[node name="FactorPlayerHorizontale" type="HSlider" parent="Window/v/Tab/JOYPAD/v/FactorPlayerHorizontale"] +offset_right = 8.0 +offset_bottom = 16.0 +size_flags_horizontal = 3 +max_value = 10.0 +step = 0.1 + +[node name="value" type="Label" parent="Window/v/Tab/JOYPAD/v/FactorPlayerHorizontale"] +minimum_size = Vector2(50, 0) +offset_right = 40.0 +offset_bottom = 23.0 + +[node name="HSeparator9" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] offset_right = 40.0 offset_bottom = 4.0 [node name="PlayerForward" type="VBoxContainer" parent="Window/v/Tab/JOYPAD/v"] -offset_right = 40.0 -offset_bottom = 40.0 +offset_right = 332.0 +offset_bottom = 61.0 [node name="Label" type="Label" parent="Window/v/Tab/JOYPAD/v/PlayerForward"] offset_right = 40.0 @@ -434,13 +512,13 @@ offset_right = 8.0 offset_bottom = 31.0 text = "SELECT" -[node name="HSeparator7" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] +[node name="HSeparator10" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] offset_right = 40.0 offset_bottom = 4.0 [node name="PlayerBack" type="VBoxContainer" parent="Window/v/Tab/JOYPAD/v"] -offset_right = 40.0 -offset_bottom = 40.0 +offset_right = 294.0 +offset_bottom = 61.0 [node name="Label" type="Label" parent="Window/v/Tab/JOYPAD/v/PlayerBack"] offset_right = 40.0 @@ -461,6 +539,32 @@ offset_right = 8.0 offset_bottom = 31.0 text = "SELECT" +[node name="HSeparator11" type="HSeparator" parent="Window/v/Tab/JOYPAD/v"] +offset_right = 40.0 +offset_bottom = 4.0 + +[node name="FactorPlayerVerticale" type="HBoxContainer" parent="Window/v/Tab/JOYPAD/v"] +offset_right = 354.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="Window/v/Tab/JOYPAD/v/FactorPlayerVerticale"] +offset_right = 40.0 +offset_bottom = 23.0 +size_flags_horizontal = 3 +text = "FACTOR_PLAYER_VERTICALE_JOYPAD" + +[node name="FactorPlayerVerticale" type="HSlider" parent="Window/v/Tab/JOYPAD/v/FactorPlayerVerticale"] +offset_right = 8.0 +offset_bottom = 16.0 +size_flags_horizontal = 3 +max_value = 10.0 +step = 0.1 + +[node name="value" type="Label" parent="Window/v/Tab/JOYPAD/v/FactorPlayerVerticale"] +minimum_size = Vector2(50, 0) +offset_right = 40.0 +offset_bottom = 23.0 + [node name="Quit" type="Button" parent="Window/v"] anchor_left = 0.5 anchor_top = 1.0 @@ -497,10 +601,14 @@ metadata/_edit_use_custom_anchors = false [connection signal="toggled" from="Window/v/Tab/MOUSE/v/CameraPlayerMove/h2/ReverseVertical" to="." method="_on_camera_player_move_reverse_vertical_toggled"] [connection signal="pressed" from="Window/v/Tab/JOYPAD/v/CameraLeft/h1/CameraLeft" to="." method="_on_camera_left_pressed"] [connection signal="pressed" from="Window/v/Tab/JOYPAD/v/CameraRight/h1/CameraRight" to="." method="_on_camera_right_pressed"] +[connection signal="value_changed" from="Window/v/Tab/JOYPAD/v/FactorCameraHorizontale/FactorCameraHorizontale" to="." method="_on_factor_camera_horizontale_value_changed"] [connection signal="pressed" from="Window/v/Tab/JOYPAD/v/CameraForward/h1/CameraForward" to="." method="_on_camera_forward_pressed"] [connection signal="pressed" from="Window/v/Tab/JOYPAD/v/CameraBack/h1/CameraBack" to="." method="_on_camera_back_pressed"] +[connection signal="value_changed" from="Window/v/Tab/JOYPAD/v/FactorCameraVerticale/FactorCameraVerticale" to="." method="_on_factor_camera_verticale_value_changed"] [connection signal="pressed" from="Window/v/Tab/JOYPAD/v/PlayerLeft/h1/PlayerLeft" to="." method="_on_player_left_pressed"] [connection signal="pressed" from="Window/v/Tab/JOYPAD/v/PlayerRight/h1/PlayerRight" to="." method="_on_player_right_pressed"] +[connection signal="value_changed" from="Window/v/Tab/JOYPAD/v/FactorPlayerHorizontale/FactorPlayerHorizontale" to="." method="_on_factor_player_horizontale_value_changed"] [connection signal="pressed" from="Window/v/Tab/JOYPAD/v/PlayerForward/h1/PlayerForward" to="." method="_on_player_forward_pressed"] [connection signal="pressed" from="Window/v/Tab/JOYPAD/v/PlayerBack/h1/PlayerBack" to="." method="_on_player_back_pressed"] +[connection signal="value_changed" from="Window/v/Tab/JOYPAD/v/FactorPlayerVerticale/FactorPlayerVerticale" to="." method="_on_factor_player_verticale_value_changed"] [connection signal="pressed" from="Window/v/Quit" to="." method="_on_quit_pressed"] diff --git a/scripts/common.gd b/scripts/common.gd index e46366b..3e1e99b 100644 --- a/scripts/common.gd +++ b/scripts/common.gd @@ -10,6 +10,11 @@ var mouse_camera_only_reverse_vertical:bool = false var mouse_camera_player_move_reverse_horizontal:bool = false var mouse_camera_player_move_reverse_vertical:bool = false +var factor_camera_horizontale_joypad:float = 2.0 +var factor_camera_verticale_joypad:float = 2.0 +var factor_player_horizontale_joypad:float = 2.0 +var factor_player_verticale_joypad:float = 2.0 + func _ready(): randomize() @@ -291,3 +296,35 @@ func get_mul_mouse_camera_player_move_reverse_vertical() -> float: return -1.0 else: return 1.0 + + +func set_factor_camera_horizontale_joypad(value:float): + factor_camera_horizontale_joypad = value + + +func get_factor_camera_horizontale_joypad() -> float: + return factor_camera_horizontale_joypad + + +func set_factor_camera_verticale_joypad(value:float): + factor_camera_verticale_joypad = value + + +func get_factor_camera_verticale_joypad() -> float: + return factor_camera_verticale_joypad + + +func set_factor_player_horizontale_joypad(value:float): + factor_player_horizontale_joypad = value + + +func get_factor_player_horizontale_joypad() -> float: + return factor_player_horizontale_joypad + + +func set_factor_player_verticale_joypad(value:float): + factor_player_verticale_joypad = value + + +func get_factor_player_verticale_joypad() -> float: + return factor_player_verticale_joypad