Merge branch 'master' of https://gitlab.hexaquo.at/ggjg20/bodypartfighter
This commit is contained in:
commit
56f491f68e
5 files changed
+16
-46
No files matched your search
@@ -28,8 +28,6 @@ signal start_fight()
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
_default_grav = PhysicsServer.area_get_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY)
|
||||
PhysicsServer.area_set_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY, 0)
|
||||
_torso = get_node(torsoPath) as RigidBody
|
||||
_camera = get_node(cameraPath) as Camera
|
||||
_rayCast = get_node(rayCastPath) as RayCast
|
||||
@@ -45,6 +43,9 @@ func change_count_ui():
|
||||
|
||||
|
||||
func _process(delta):
|
||||
# TODO: Would be nicer to just disable gravity, but then it can't be re-enabled...
|
||||
_torso.translation = Vector3.ZERO
|
||||
|
||||
if _viewRot:
|
||||
var mouse_pos = get_viewport().get_mouse_position()
|
||||
|
||||
@@ -133,6 +134,4 @@ func delete_body_part():
|
||||
|
||||
|
||||
func _on_Start_pressed():
|
||||
PhysicsServer.area_set_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY, _default_grav)
|
||||
|
||||
emit_signal("start_fight", _torso)
|
||||
Reference in new issue
Block a user