From 8b932533e6d25a80f185bae299351426a4ca157e Mon Sep 17 00:00:00 2001 From: IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> Date: Sun, 17 Jul 2022 02:44:50 +0200 Subject: post game behaviour --- godot/scenes/Die.gd | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'godot/scenes/Die.gd') diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd index 62d1d99..93d3bfa 100644 --- a/godot/scenes/Die.gd +++ b/godot/scenes/Die.gd @@ -28,11 +28,13 @@ func _ready(): _game = get_node("/root/Game") mat = get_physics_material_override() previous_bounciness = mat.get_bounce() - - ball() func _input(event): + if _game.is_post_game(): + _game.next_level() + return + if event is InputEventKey: if event.scancode == KEY_TAB: if event.is_pressed(): @@ -91,27 +93,7 @@ BUFFS """ func get_upwards_side(): - var forward = -global_transform.basis.z - - var up = forward.angle_to(Vector3.UP) - var down = forward.angle_to(Vector3.DOWN) - var left = forward.angle_to(Vector3.LEFT) - var right = forward.angle_to(Vector3.RIGHT) - var forw = forward.angle_to(Vector3.FORWARD) - var back = forward.angle_to(Vector3.BACK) - - # 0 = ball, 1 = phase, 2 = bounce - var dictionary = { - up: 0, - down: 1, - left: 2, - right: 0, - forw: 1, - back: 2 - } - - var smallest = dictionary.keys().min() - return dictionary[smallest] + return 0 func extra_stroke(): -- cgit