From 7e66ac4ff518e6aa091c7ccfe567e31fa1f51994 Mon Sep 17 00:00:00 2001 From: IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> Date: Sun, 17 Jul 2022 04:32:58 +0200 Subject: made sure strokes are updated after each one --- godot/scenes/Die.gd | 5 +++-- godot/scenes/Die.tscn | 1 + godot/scenes/Game.gd | 1 + godot/scenes/levels/level1/level1.tscn | 14 +++++++------- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd index 9341bc1..878b7be 100644 --- a/godot/scenes/Die.gd +++ b/godot/scenes/Die.gd @@ -14,7 +14,7 @@ var mouse_origin = Vector2(0,0) var die_launch_force_magnitude = 0 var die_launch_force_direction = Vector3(0,0,0) var die_launch_force = Vector3(0,0,0) -var die_launch_force_multiplier = 0.05 +var die_launch_force_multiplier = 0.001 var left_pressed = false var mat @@ -60,8 +60,9 @@ func _input(event): die_launch_force_direction = $CamRoot/Horizontal/Vertical/Camera.get_global_transform().basis die_launch_force_direction = -die_launch_force_direction.z die_launch_force = die_launch_force_direction * die_launch_force_magnitude * die_launch_force_multiplier - self.apply_central_impulse(die_launch_force) + self.apply_impulse(global_transform.origin, die_launch_force) Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) + _game.add_stroke() if event is InputEventMouseMotion: camrot_h += -event.relative.x * sensitivity diff --git a/godot/scenes/Die.tscn b/godot/scenes/Die.tscn index bbd73ed..757cceb 100644 --- a/godot/scenes/Die.tscn +++ b/godot/scenes/Die.tscn @@ -59,6 +59,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 15.0578, 0 ) [node name="Camera" type="ClippedCamera" parent="CamRoot/Horizontal/Vertical"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10.1285 ) +current = true far = 8192.0 margin = 0.57 process_mode = 1 diff --git a/godot/scenes/Game.gd b/godot/scenes/Game.gd index 8b86263..f53c39a 100644 --- a/godot/scenes/Game.gd +++ b/godot/scenes/Game.gd @@ -60,6 +60,7 @@ func revoke_stroke(): func open_scoreboard(): + strokes_per_level[current_level_id] = current_strokes $Scoreboard.update_values(strokes_per_level, PAR) $Scoreboard.show() diff --git a/godot/scenes/levels/level1/level1.tscn b/godot/scenes/levels/level1/level1.tscn index 634d7bb..04049d4 100644 --- a/godot/scenes/levels/level1/level1.tscn +++ b/godot/scenes/levels/level1/level1.tscn @@ -7,6 +7,7 @@ [ext_resource path="res://assets/game_objects/beamTurret.glb" type="PackedScene" id=5] [ext_resource path="res://assets/game_objects/window(Clone).material" type="Material" id=6] [ext_resource path="res://scenes/Die.tscn" type="PackedScene" id=7] +[ext_resource path="res://scenes/objects/GoalZone.tscn" type="PackedScene" id=8] [sub_resource type="ConcavePolygonShape" id=4] data = PoolVector3Array( 0.0073, 0.0938, -0.0073, 0.0138, 0.0563, -0.0138, 0.0169, 0.0563, -0.0098, 0.0169, 0.0563, -0.0098, 0.009, 0.0938, -0.0052, 0.0073, 0.0938, -0.0073, -0.0051, 0.0563, 0.0189, -0.0027, 0.0938, 0.01, 0, 0.0938, 0.0104, 0, 0.0938, 0.0104, 0, 0.0563, 0.0196, -0.0051, 0.0563, 0.0189, -0.0051, 0.0563, -0.0189, -0.0027, 0.0938, -0.01, -0.0052, 0.0938, -0.009, -0.0052, 0.0938, -0.009, -0.0098, 0.0563, -0.0169, -0.0051, 0.0563, -0.0189, 0.01, 0.0938, 0.0027, 0.0104, 0.0938, 0, 0.0196, 0.0563, 0, 0.0196, 0.0563, 0, 0.0189, 0.0563, 0.0051, 0.01, 0.0938, 0.0027, 0.009, 0.0938, 0.0052, 0.01, 0.0938, 0.0027, 0.0189, 0.0563, 0.0051, 0.0189, 0.0563, 0.0051, 0.0169, 0.0563, 0.0098, 0.009, 0.0938, 0.0052, 0.01, 0.0938, -0.0027, 0.0189, 0.0563, -0.0051, 0.0196, 0.0563, 0, 0.0196, 0.0563, 0, 0.0104, 0.0938, 0, 0.01, 0.0938, -0.0027, 0, 0.0563, 0.0196, 0, 0.0938, 0.0104, 0.0027, 0.0938, 0.01, 0.0027, 0.0938, 0.01, 0.0051, 0.0563, 0.0189, 0, 0.0563, 0.0196, 0, 0.0563, -0.0196, 0, 0.0938, -0.0104, -0.0027, 0.0938, -0.01, -0.0027, 0.0938, -0.01, -0.0051, 0.0563, -0.0189, 0, 0.0563, -0.0196, 0.0051, 0.0563, -0.0189, 0.0027, 0.0938, -0.01, 0, 0.0938, -0.0104, 0, 0.0938, -0.0104, 0, 0.0563, -0.0196, 0.0051, 0.0563, -0.0189, 0.0098, 0.0563, -0.0169, 0.0052, 0.0938, -0.009, 0.0027, 0.0938, -0.01, 0.0027, 0.0938, -0.01, 0.0051, 0.0563, -0.0189, 0.0098, 0.0563, -0.0169, -0.0169, 0.0563, 0.0098, -0.009, 0.0938, 0.0052, -0.0073, 0.0938, 0.0073, -0.0073, 0.0938, 0.0073, -0.0138, 0.0563, 0.0138, -0.0169, 0.0563, 0.0098, 0.0375, 0, -0.0375, 0.0375, 0.0188, -0.0375, -0.0375, 0.0188, -0.0375, -0.0375, 0.0188, -0.0375, -0.0375, 0, -0.0375, 0.0375, 0, -0.0375, -0.0189, 0.0563, -0.0051, -0.01, 0.0938, -0.0027, -0.0104, 0.0938, 0, -0.0104, 0.0938, 0, -0.0196, 0.0563, 0, -0.0189, 0.0563, -0.0051, -0.0098, 0.0563, -0.0169, -0.0052, 0.0938, -0.009, -0.0073, 0.0938, -0.0073, -0.0073, 0.0938, -0.0073, -0.0138, 0.0563, -0.0138, -0.0098, 0.0563, -0.0169, -0.0375, 0, 0.0375, 0.0375, 0, 0.0375, 0.0375, 0, -0.0375, 0.0375, 0, -0.0375, -0.0375, 0, -0.0375, -0.0375, 0, 0.0375, 0.0138, 0.0563, -0.0138, 0.0073, 0.0938, -0.0073, 0.0052, 0.0938, -0.009, 0.0052, 0.0938, -0.009, 0.0098, 0.0563, -0.0169, 0.0138, 0.0563, -0.0138, 0.0098, 0.0563, 0.0169, 0.0052, 0.0938, 0.009, 0.0073, 0.0938, 0.0073, 0.0073, 0.0938, 0.0073, 0.0138, 0.0563, 0.0138, 0.0098, 0.0563, 0.0169, -0.0169, 0.0563, -0.0098, -0.0138, 0.0563, -0.0138, -0.0073, 0.0938, -0.0073, -0.0073, 0.0938, -0.0073, -0.009, 0.0938, -0.0052, -0.0169, 0.0563, -0.0098, 0.009, 0.0938, -0.0052, 0.0169, 0.0563, -0.0098, 0.0189, 0.0563, -0.0051, 0.0189, 0.0563, -0.0051, 0.01, 0.0938, -0.0027, 0.009, 0.0938, -0.0052, -0.0375, 0, 0.0375, -0.0375, 0.0188, 0.0375, 0.0375, 0.0188, 0.0375, 0.0375, 0.0188, 0.0375, 0.0375, 0, 0.0375, -0.0375, 0, 0.0375, 0.0375, 0.0188, 0.0375, 0.0375, 0.0188, -0.0375, 0.0375, 0, -0.0375, 0.0375, 0, -0.0375, 0.0375, 0, 0.0375, 0.0375, 0.0188, 0.0375, 0.0073, 0.0938, 0.0073, 0.009, 0.0938, 0.0052, 0.0169, 0.0563, 0.0098, 0.0169, 0.0563, 0.0098, 0.0138, 0.0563, 0.0138, 0.0073, 0.0938, 0.0073, -0.0189, 0.0563, -0.0051, -0.0169, 0.0563, -0.0098, -0.009, 0.0938, -0.0052, -0.009, 0.0938, -0.0052, -0.01, 0.0938, -0.0027, -0.0189, 0.0563, -0.0051, -0.0196, 0.0563, 0, -0.0104, 0.0938, 0, -0.01, 0.0938, 0.0027, -0.01, 0.0938, 0.0027, -0.0189, 0.0563, 0.0051, -0.0196, 0.0563, 0, 0.01, 0.0938, -0.0027, 0.0104, 0.0938, 0, 0.01, 0.0938, 0.0027, 0.009, 0.0938, -0.0052, 0.01, 0.0938, -0.0027, 0.01, 0.0938, 0.0027, 0.009, 0.0938, -0.0052, 0.01, 0.0938, 0.0027, 0.009, 0.0938, 0.0052, 0.0073, 0.0938, -0.0073, 0.009, 0.0938, -0.0052, 0.009, 0.0938, 0.0052, 0.0073, 0.0938, -0.0073, 0.009, 0.0938, 0.0052, 0.0073, 0.0938, 0.0073, 0.0052, 0.0938, -0.009, 0.0073, 0.0938, -0.0073, 0.0073, 0.0938, 0.0073, 0.0052, 0.0938, -0.009, 0.0073, 0.0938, 0.0073, 0.0052, 0.0938, 0.009, 0.0027, 0.0938, -0.01, 0.0052, 0.0938, -0.009, 0.0052, 0.0938, 0.009, 0.0027, 0.0938, -0.01, 0.0052, 0.0938, 0.009, 0.0027, 0.0938, 0.01, 0, 0.0938, -0.0104, 0.0027, 0.0938, -0.01, 0.0027, 0.0938, 0.01, 0, 0.0938, -0.0104, 0.0027, 0.0938, 0.01, 0, 0.0938, 0.0104, -0.0027, 0.0938, -0.01, 0, 0.0938, -0.0104, 0, 0.0938, 0.0104, -0.0027, 0.0938, -0.01, 0, 0.0938, 0.0104, -0.0027, 0.0938, 0.01, -0.0052, 0.0938, -0.009, -0.0027, 0.0938, -0.01, -0.0027, 0.0938, 0.01, -0.0052, 0.0938, -0.009, -0.0027, 0.0938, 0.01, -0.0052, 0.0938, 0.009, -0.0073, 0.0938, -0.0073, -0.0052, 0.0938, -0.009, -0.0052, 0.0938, 0.009, -0.0073, 0.0938, -0.0073, -0.0052, 0.0938, 0.009, -0.0073, 0.0938, 0.0073, -0.009, 0.0938, -0.0052, -0.0073, 0.0938, -0.0073, -0.0073, 0.0938, 0.0073, -0.009, 0.0938, -0.0052, -0.0073, 0.0938, 0.0073, -0.009, 0.0938, 0.0052, -0.01, 0.0938, -0.0027, -0.009, 0.0938, -0.0052, -0.009, 0.0938, 0.0052, -0.01, 0.0938, -0.0027, -0.009, 0.0938, 0.0052, -0.01, 0.0938, 0.0027, -0.01, 0.0938, 0.0027, -0.0104, 0.0938, 0, -0.01, 0.0938, -0.0027, -0.0098, 0.0563, 0.0169, -0.0052, 0.0938, 0.009, -0.0027, 0.0938, 0.01, -0.0027, 0.0938, 0.01, -0.0051, 0.0563, 0.0189, -0.0098, 0.0563, 0.0169, 0.0051, 0.0563, 0.0189, 0.0027, 0.0938, 0.01, 0.0052, 0.0938, 0.009, 0.0052, 0.0938, 0.009, 0.0098, 0.0563, 0.0169, 0.0051, 0.0563, 0.0189, -0.0138, 0.0563, 0.0138, -0.0073, 0.0938, 0.0073, -0.0052, 0.0938, 0.009, -0.0052, 0.0938, 0.009, -0.0098, 0.0563, 0.0169, -0.0138, 0.0563, 0.0138, -0.0375, 0, 0.0375, -0.0375, 0, -0.0375, -0.0375, 0.0188, -0.0375, -0.0375, 0.0188, -0.0375, -0.0375, 0.0188, 0.0375, -0.0375, 0, 0.0375, -0.0189, 0.0563, 0.0051, -0.01, 0.0938, 0.0027, -0.009, 0.0938, 0.0052, -0.009, 0.0938, 0.0052, -0.0169, 0.0563, 0.0098, -0.0189, 0.0563, 0.0051, 0.0375, 0.0188, -0.0375, 0.0288, 0.0188, 0, 0.0278, 0.0188, -0.0074, 0.0375, 0.0188, -0.0375, 0.0278, 0.0188, -0.0074, 0.0249, 0.0188, -0.0144, 0.0375, 0.0188, -0.0375, 0.0249, 0.0188, -0.0144, 0.0203, 0.0188, -0.0203, 0.0375, 0.0188, -0.0375, 0.0203, 0.0188, -0.0203, 0.0144, 0.0188, -0.0249, 0.0375, 0.0188, -0.0375, 0.0144, 0.0188, -0.0249, 0.0074, 0.0188, -0.0278, 0.0375, 0.0188, -0.0375, 0.0074, 0.0188, -0.0278, 0, 0.0188, -0.0288, 0.0375, 0.0188, -0.0375, 0, 0.0188, -0.0288, -0.0074, 0.0188, -0.0278, 0.0375, 0.0188, -0.0375, 0.0375, 0.0188, 0.0375, 0.0288, 0.0188, 0, -0.0375, 0.0188, -0.0375, 0.0375, 0.0188, -0.0375, -0.0074, 0.0188, -0.0278, -0.0074, 0.0188, -0.0278, -0.0144, 0.0188, -0.0249, -0.0375, 0.0188, -0.0375, -0.0144, 0.0188, -0.0249, -0.0203, 0.0188, -0.0203, -0.0375, 0.0188, -0.0375, -0.0203, 0.0188, -0.0203, -0.0249, 0.0188, -0.0144, -0.0375, 0.0188, -0.0375, -0.0249, 0.0188, -0.0144, -0.0278, 0.0188, -0.0074, -0.0375, 0.0188, -0.0375, -0.0278, 0.0188, -0.0074, -0.0375, 0.0188, 0.0375, -0.0375, 0.0188, -0.0375, -0.0278, 0.0188, -0.0074, -0.0288, 0.0188, 0, -0.0375, 0.0188, 0.0375, 0.0278, 0.0188, 0.0074, 0.0288, 0.0188, 0, 0.0375, 0.0188, 0.0375, 0.0249, 0.0188, 0.0144, 0.0278, 0.0188, 0.0074, 0.0375, 0.0188, 0.0375, 0.0203, 0.0188, 0.0203, 0.0249, 0.0188, 0.0144, 0.0375, 0.0188, 0.0375, 0.0144, 0.0188, 0.0249, 0.0203, 0.0188, 0.0203, 0.0375, 0.0188, 0.0375, 0.0074, 0.0188, 0.0278, 0.0144, 0.0188, 0.0249, 0.0375, 0.0188, 0.0375, 0, 0.0188, 0.0288, 0.0074, 0.0188, 0.0278, 0.0375, 0.0188, 0.0375, -0.0074, 0.0188, 0.0278, 0, 0.0188, 0.0288, 0.0375, 0.0188, 0.0375, -0.0074, 0.0188, 0.0278, 0.0375, 0.0188, 0.0375, -0.0375, 0.0188, 0.0375, -0.0144, 0.0188, 0.0249, -0.0074, 0.0188, 0.0278, -0.0375, 0.0188, 0.0375, -0.0203, 0.0188, 0.0203, -0.0144, 0.0188, 0.0249, -0.0375, 0.0188, 0.0375, -0.0249, 0.0188, 0.0144, -0.0203, 0.0188, 0.0203, -0.0375, 0.0188, 0.0375, -0.0278, 0.0188, 0.0074, -0.0249, 0.0188, 0.0144, -0.0375, 0.0188, 0.0375, -0.0375, 0.0188, 0.0375, -0.0288, 0.0188, 0, -0.0278, 0.0188, 0.0074, 0.0074, 0.0188, 0.0278, 0.0051, 0.0563, 0.0189, 0.0098, 0.0563, 0.0169, 0.0098, 0.0563, 0.0169, 0.0144, 0.0188, 0.0249, 0.0074, 0.0188, 0.0278, 0, 0.0188, 0.0288, 0, 0.0563, 0.0196, 0.0051, 0.0563, 0.0189, 0.0051, 0.0563, 0.0189, 0.0074, 0.0188, 0.0278, 0, 0.0188, 0.0288, -0.0278, 0.0188, -0.0074, -0.0249, 0.0188, -0.0144, -0.0169, 0.0563, -0.0098, -0.0169, 0.0563, -0.0098, -0.0189, 0.0563, -0.0051, -0.0278, 0.0188, -0.0074, -0.0288, 0.0188, 0, -0.0278, 0.0188, -0.0074, -0.0189, 0.0563, -0.0051, -0.0189, 0.0563, -0.0051, -0.0196, 0.0563, 0, -0.0288, 0.0188, 0, -0.0288, 0.0188, 0, -0.0196, 0.0563, 0, -0.0189, 0.0563, 0.0051, -0.0189, 0.0563, 0.0051, -0.0278, 0.0188, 0.0074, -0.0288, 0.0188, 0, 0.0074, 0.0188, -0.0278, 0.0051, 0.0563, -0.0189, 0, 0.0563, -0.0196, 0, 0.0563, -0.0196, 0, 0.0188, -0.0288, 0.0074, 0.0188, -0.0278, 0.0144, 0.0188, 0.0249, 0.0098, 0.0563, 0.0169, 0.0138, 0.0563, 0.0138, 0.0138, 0.0563, 0.0138, 0.0203, 0.0188, 0.0203, 0.0144, 0.0188, 0.0249, 0.0138, 0.0563, 0.0138, 0.0169, 0.0563, 0.0098, 0.0249, 0.0188, 0.0144, 0.0249, 0.0188, 0.0144, 0.0203, 0.0188, 0.0203, 0.0138, 0.0563, 0.0138, -0.0249, 0.0188, -0.0144, -0.0203, 0.0188, -0.0203, -0.0138, 0.0563, -0.0138, -0.0138, 0.0563, -0.0138, -0.0169, 0.0563, -0.0098, -0.0249, 0.0188, -0.0144, -0.0278, 0.0188, 0.0074, -0.0189, 0.0563, 0.0051, -0.0169, 0.0563, 0.0098, -0.0169, 0.0563, 0.0098, -0.0249, 0.0188, 0.0144, -0.0278, 0.0188, 0.0074, -0.0144, 0.0188, -0.0249, -0.0098, 0.0563, -0.0169, -0.0138, 0.0563, -0.0138, -0.0138, 0.0563, -0.0138, -0.0203, 0.0188, -0.0203, -0.0144, 0.0188, -0.0249, 0.0144, 0.0188, -0.0249, 0.0098, 0.0563, -0.0169, 0.0051, 0.0563, -0.0189, 0.0051, 0.0563, -0.0189, 0.0074, 0.0188, -0.0278, 0.0144, 0.0188, -0.0249, 0.0203, 0.0188, -0.0203, 0.0138, 0.0563, -0.0138, 0.0098, 0.0563, -0.0169, 0.0098, 0.0563, -0.0169, 0.0144, 0.0188, -0.0249, 0.0203, 0.0188, -0.0203, -0.0144, 0.0188, 0.0249, -0.0098, 0.0563, 0.0169, -0.0051, 0.0563, 0.0189, -0.0051, 0.0563, 0.0189, -0.0074, 0.0188, 0.0278, -0.0144, 0.0188, 0.0249, -0.0249, 0.0188, 0.0144, -0.0169, 0.0563, 0.0098, -0.0138, 0.0563, 0.0138, -0.0138, 0.0563, 0.0138, -0.0203, 0.0188, 0.0203, -0.0249, 0.0188, 0.0144, 0.0169, 0.0563, -0.0098, 0.0249, 0.0188, -0.0144, 0.0278, 0.0188, -0.0074, 0.0278, 0.0188, -0.0074, 0.0189, 0.0563, -0.0051, 0.0169, 0.0563, -0.0098, -0.0203, 0.0188, 0.0203, -0.0138, 0.0563, 0.0138, -0.0098, 0.0563, 0.0169, -0.0098, 0.0563, 0.0169, -0.0144, 0.0188, 0.0249, -0.0203, 0.0188, 0.0203, 0, 0.0188, -0.0288, 0, 0.0563, -0.0196, -0.0051, 0.0563, -0.0189, -0.0051, 0.0563, -0.0189, -0.0074, 0.0188, -0.0278, 0, 0.0188, -0.0288, -0.0074, 0.0188, 0.0278, -0.0051, 0.0563, 0.0189, 0, 0.0563, 0.0196, 0, 0.0563, 0.0196, 0, 0.0188, 0.0288, -0.0074, 0.0188, 0.0278, 0.0189, 0.0563, 0.0051, 0.0196, 0.0563, 0, 0.0288, 0.0188, 0, 0.0288, 0.0188, 0, 0.0278, 0.0188, 0.0074, 0.0189, 0.0563, 0.0051, 0.0138, 0.0563, -0.0138, 0.0203, 0.0188, -0.0203, 0.0249, 0.0188, -0.0144, 0.0249, 0.0188, -0.0144, 0.0169, 0.0563, -0.0098, 0.0138, 0.0563, -0.0138, 0.0169, 0.0563, 0.0098, 0.0189, 0.0563, 0.0051, 0.0278, 0.0188, 0.0074, 0.0278, 0.0188, 0.0074, 0.0249, 0.0188, 0.0144, 0.0169, 0.0563, 0.0098, 0.0196, 0.0563, 0, 0.0189, 0.0563, -0.0051, 0.0278, 0.0188, -0.0074, 0.0278, 0.0188, -0.0074, 0.0288, 0.0188, 0, 0.0196, 0.0563, 0, -0.0074, 0.0188, -0.0278, -0.0051, 0.0563, -0.0189, -0.0098, 0.0563, -0.0169, -0.0098, 0.0563, -0.0169, -0.0144, 0.0188, -0.0249, -0.0074, 0.0188, -0.0278 ) @@ -62,8 +63,6 @@ points = PoolVector3Array( 0.639679, 0.116664, -0.364341, 0.828143, 0.2, 0.18101 [sub_resource type="ConvexPolygonShape" id=20] points = PoolVector3Array( -0.71742, 0.11773, -0.254227, -0.388641, 0.201786, -0.447582, -0.388641, 0.112117, -0.447582, -0.728268, 0.107464, 0.231456, -0.828143, 0.2, 0.181011, -0.599265, 0.197787, -0.408004, -0.717416, 0.201786, 0.195001, -0.514534, 0.11479, -0.48653, -0.828732, 0.113785, 0.181933, -0.78306, 0.196238, -0.110443, -0.817494, 0.116032, 0.0278944, -0.4, 0.199515, -0.489681, -0.514534, 0.199112, -0.48653, -0.73199, 0.196678, -0.228984, -0.639679, 0.116664, -0.364341, -0.4, 0.114388, -0.489681, -0.78306, 0.117664, -0.110443, -0.817494, 0.197871, 0.0278944, -0.639679, 0.197239, -0.364341, -0.73199, 0.117225, -0.228984, -0.599265, 0.116116, -0.408004 ) -[sub_resource type="BoxShape" id=3] - [sub_resource type="BoxShape" id=21] [sub_resource type="CylinderMesh" id=22] @@ -166,11 +165,8 @@ shape = SubResource( 19 ) transform = Transform( -1.222, 0, -2.22395e-06, 0, 30, 0, 2.22395e-06, 0, -1.222, -0.0397539, -6.27184, -6.92309 ) shape = SubResource( 20 ) -[node name="Area" type="Area" parent="Spatial/StaticBody level"] - -[node name="victorycollision" type="CollisionShape" parent="Spatial/StaticBody level/Area"] -transform = Transform( 0.121517, 0, 0, 0, 0.130879, 0, 0, 0, 0.121517, 0, -2.8502, -7.1767 ) -shape = SubResource( 3 ) +[node name="GoalZone" parent="Spatial/StaticBody level" instance=ExtResource( 8 )] +transform = Transform( 0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, -0.000546885, -2.79064, -7.17821 ) [node name="StaticBody turret" type="StaticBody" parent="Spatial"] transform = Transform( 0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, 0.707107, -0.0730354, -2.66775, -2.27479 ) @@ -194,6 +190,8 @@ shape = SubResource( 21 ) [node name="Beams1" type="StaticBody" parent="Spatial"] transform = Transform( 0.254558, 1.64636e-10, 0.0106066, -5.58794e-09, 0.015, 0, -0.254558, -1.64636e-10, 0.0106066, 0.128531, -2.11866, -2.47778 ) +collision_layer = 2 +collision_mask = 3 [node name="MeshInstance" type="MeshInstance" parent="Spatial/Beams1"] transform = Transform( -1.02354e-07, 0.8, 0, -2.34158, -3.49691e-08, 0, 0, 0, 0.8, 0, 0, 0 ) @@ -246,6 +244,8 @@ shape = SubResource( 21 ) [node name="Beams2" type="StaticBody" parent="Spatial"] transform = Transform( 0.254558, 1.64636e-10, -0.0106066, -5.58794e-09, 0.015, 0, 0.254558, 1.64636e-10, 0.0106066, -0.126502, -2.11866, -4.48365 ) +collision_layer = 3 +collision_mask = 3 [node name="MeshInstance" type="MeshInstance" parent="Spatial/Beams2"] transform = Transform( -1.02354e-07, 0.8, 0, -2.34158, -3.49691e-08, 0, 0, 0, 0.8, 0, 0, 0 ) -- cgit From 3aab06c6763fc5ad3396bd5451c100364afeb76b Mon Sep 17 00:00:00 2001 From: IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> Date: Sun, 17 Jul 2022 05:18:57 +0200 Subject: buff detection --- godot/scenes/Die.gd | 27 ++++++++++-- godot/scenes/Die.tscn | 69 ++++++++++++++++++++++++++++++- godot/scenes/levels/level1/level1.tscn | 6 ++- godot/scenes/objects/GroundCollision.tscn | 11 +++++ 4 files changed, 108 insertions(+), 5 deletions(-) create mode 100644 godot/scenes/objects/GroundCollision.tscn diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd index 878b7be..aec80a5 100644 --- a/godot/scenes/Die.gd +++ b/godot/scenes/Die.gd @@ -23,6 +23,14 @@ var previous_bounciness = 0 var _game: Game = null +enum buff { + none, + stroke, + bounce, + phase, + ball +} + # Called when the node enters the scene tree for the first time. func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) @@ -87,7 +95,7 @@ func _physics_process(delta): dice_is_moving = false if angular_velocity.length() == 0: - get_upwards_side() + get_buff_from_upwards_side() last_frame_position = Vector3(translation.x, translation.y, translation.x) @@ -101,8 +109,21 @@ func _physics_process(delta): BUFFS """ -func get_upwards_side(): - return 0 +func get_buff_from_upwards_side(): + if $Plus1.get_overlapping_areas().size() > 0 || $Plus2.get_overlapping_areas().size() > 0: + print("buff: plus") + return buff.stroke + if $Ball1.get_overlapping_areas().size() > 0 || $Ball2.get_overlapping_areas().size() > 0: + print("buff: ball") + return buff.ball + if $Bounce1.get_overlapping_areas().size() > 0 || $Bounce2.get_overlapping_areas().size() > 0: + print("buff: bounce") + return buff.bounce + if $Phase1.get_overlapping_areas().size() > 0 || $Phase2.get_overlapping_areas().size() > 0: + print("buff: phase") + return buff.phase + + return buff.none func extra_stroke(): diff --git a/godot/scenes/Die.tscn b/godot/scenes/Die.tscn index 757cceb..a4017cb 100644 --- a/godot/scenes/Die.tscn +++ b/godot/scenes/Die.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://scenes/Die.gd" type="Script" id=1] [ext_resource path="res://assets/game_objects/W8baseColor_Mat.material" type="Material" id=2] @@ -27,6 +27,9 @@ surfaces/0 = { [sub_resource type="SphereMesh" id=5] +[sub_resource type="SphereShape" id=6] +radius = 0.1 + [node name="Die" type="RigidBody"] collision_mask = 3 physics_material_override = SubResource( 3 ) @@ -63,3 +66,67 @@ current = true far = 8192.0 margin = 0.57 process_mode = 1 + +[node name="Plus1" type="Area" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.326057, 0.384412, 0.301075 ) +collision_layer = 4 +collision_mask = 4 + +[node name="CollisionShape" type="CollisionShape" parent="Plus1"] +shape = SubResource( 6 ) + +[node name="Plus2" type="Area" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.326, -0.384, -0.301 ) +collision_layer = 4 +collision_mask = 4 + +[node name="CollisionShape" type="CollisionShape" parent="Plus2"] +shape = SubResource( 6 ) + +[node name="Ball1" type="Area" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.326, -0.384, 0.301 ) +collision_layer = 4 +collision_mask = 4 + +[node name="CollisionShape" type="CollisionShape" parent="Ball1"] +shape = SubResource( 6 ) + +[node name="Ball2" type="Area" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.326, 0.384, -0.301 ) +collision_layer = 4 +collision_mask = 4 + +[node name="CollisionShape" type="CollisionShape" parent="Ball2"] +shape = SubResource( 6 ) + +[node name="Bounce1" type="Area" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.326, 0.384, -0.301 ) +collision_layer = 4 +collision_mask = 4 + +[node name="CollisionShape" type="CollisionShape" parent="Bounce1"] +shape = SubResource( 6 ) + +[node name="Bounce2" type="Area" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.326, -0.384, 0.301 ) +collision_layer = 4 +collision_mask = 4 + +[node name="CollisionShape" type="CollisionShape" parent="Bounce2"] +shape = SubResource( 6 ) + +[node name="Phase1" type="Area" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.326, -0.384, -0.301 ) +collision_layer = 4 +collision_mask = 4 + +[node name="CollisionShape" type="CollisionShape" parent="Phase1"] +shape = SubResource( 6 ) + +[node name="Phase2" type="Area" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.326, 0.384, 0.301 ) +collision_layer = 4 +collision_mask = 4 + +[node name="CollisionShape" type="CollisionShape" parent="Phase2"] +shape = SubResource( 6 ) diff --git a/godot/scenes/levels/level1/level1.tscn b/godot/scenes/levels/level1/level1.tscn index 04049d4..793b2c0 100644 --- a/godot/scenes/levels/level1/level1.tscn +++ b/godot/scenes/levels/level1/level1.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=30 format=2] +[gd_scene load_steps=31 format=2] [ext_resource path="res://assets/game_objects/level1_BG_model.glb" type="PackedScene" id=1] [ext_resource path="res://assets/game_objects/level1_track_model.glb" type="PackedScene" id=2] @@ -8,6 +8,7 @@ [ext_resource path="res://assets/game_objects/window(Clone).material" type="Material" id=6] [ext_resource path="res://scenes/Die.tscn" type="PackedScene" id=7] [ext_resource path="res://scenes/objects/GoalZone.tscn" type="PackedScene" id=8] +[ext_resource path="res://scenes/objects/GroundCollision.tscn" type="PackedScene" id=9] [sub_resource type="ConcavePolygonShape" id=4] data = PoolVector3Array( 0.0073, 0.0938, -0.0073, 0.0138, 0.0563, -0.0138, 0.0169, 0.0563, -0.0098, 0.0169, 0.0563, -0.0098, 0.009, 0.0938, -0.0052, 0.0073, 0.0938, -0.0073, -0.0051, 0.0563, 0.0189, -0.0027, 0.0938, 0.01, 0, 0.0938, 0.0104, 0, 0.0938, 0.0104, 0, 0.0563, 0.0196, -0.0051, 0.0563, 0.0189, -0.0051, 0.0563, -0.0189, -0.0027, 0.0938, -0.01, -0.0052, 0.0938, -0.009, -0.0052, 0.0938, -0.009, -0.0098, 0.0563, -0.0169, -0.0051, 0.0563, -0.0189, 0.01, 0.0938, 0.0027, 0.0104, 0.0938, 0, 0.0196, 0.0563, 0, 0.0196, 0.0563, 0, 0.0189, 0.0563, 0.0051, 0.01, 0.0938, 0.0027, 0.009, 0.0938, 0.0052, 0.01, 0.0938, 0.0027, 0.0189, 0.0563, 0.0051, 0.0189, 0.0563, 0.0051, 0.0169, 0.0563, 0.0098, 0.009, 0.0938, 0.0052, 0.01, 0.0938, -0.0027, 0.0189, 0.0563, -0.0051, 0.0196, 0.0563, 0, 0.0196, 0.0563, 0, 0.0104, 0.0938, 0, 0.01, 0.0938, -0.0027, 0, 0.0563, 0.0196, 0, 0.0938, 0.0104, 0.0027, 0.0938, 0.01, 0.0027, 0.0938, 0.01, 0.0051, 0.0563, 0.0189, 0, 0.0563, 0.0196, 0, 0.0563, -0.0196, 0, 0.0938, -0.0104, -0.0027, 0.0938, -0.01, -0.0027, 0.0938, -0.01, -0.0051, 0.0563, -0.0189, 0, 0.0563, -0.0196, 0.0051, 0.0563, -0.0189, 0.0027, 0.0938, -0.01, 0, 0.0938, -0.0104, 0, 0.0938, -0.0104, 0, 0.0563, -0.0196, 0.0051, 0.0563, -0.0189, 0.0098, 0.0563, -0.0169, 0.0052, 0.0938, -0.009, 0.0027, 0.0938, -0.01, 0.0027, 0.0938, -0.01, 0.0051, 0.0563, -0.0189, 0.0098, 0.0563, -0.0169, -0.0169, 0.0563, 0.0098, -0.009, 0.0938, 0.0052, -0.0073, 0.0938, 0.0073, -0.0073, 0.0938, 0.0073, -0.0138, 0.0563, 0.0138, -0.0169, 0.0563, 0.0098, 0.0375, 0, -0.0375, 0.0375, 0.0188, -0.0375, -0.0375, 0.0188, -0.0375, -0.0375, 0.0188, -0.0375, -0.0375, 0, -0.0375, 0.0375, 0, -0.0375, -0.0189, 0.0563, -0.0051, -0.01, 0.0938, -0.0027, -0.0104, 0.0938, 0, -0.0104, 0.0938, 0, -0.0196, 0.0563, 0, -0.0189, 0.0563, -0.0051, -0.0098, 0.0563, -0.0169, -0.0052, 0.0938, -0.009, -0.0073, 0.0938, -0.0073, -0.0073, 0.0938, -0.0073, -0.0138, 0.0563, -0.0138, -0.0098, 0.0563, -0.0169, -0.0375, 0, 0.0375, 0.0375, 0, 0.0375, 0.0375, 0, -0.0375, 0.0375, 0, -0.0375, -0.0375, 0, -0.0375, -0.0375, 0, 0.0375, 0.0138, 0.0563, -0.0138, 0.0073, 0.0938, -0.0073, 0.0052, 0.0938, -0.009, 0.0052, 0.0938, -0.009, 0.0098, 0.0563, -0.0169, 0.0138, 0.0563, -0.0138, 0.0098, 0.0563, 0.0169, 0.0052, 0.0938, 0.009, 0.0073, 0.0938, 0.0073, 0.0073, 0.0938, 0.0073, 0.0138, 0.0563, 0.0138, 0.0098, 0.0563, 0.0169, -0.0169, 0.0563, -0.0098, -0.0138, 0.0563, -0.0138, -0.0073, 0.0938, -0.0073, -0.0073, 0.0938, -0.0073, -0.009, 0.0938, -0.0052, -0.0169, 0.0563, -0.0098, 0.009, 0.0938, -0.0052, 0.0169, 0.0563, -0.0098, 0.0189, 0.0563, -0.0051, 0.0189, 0.0563, -0.0051, 0.01, 0.0938, -0.0027, 0.009, 0.0938, -0.0052, -0.0375, 0, 0.0375, -0.0375, 0.0188, 0.0375, 0.0375, 0.0188, 0.0375, 0.0375, 0.0188, 0.0375, 0.0375, 0, 0.0375, -0.0375, 0, 0.0375, 0.0375, 0.0188, 0.0375, 0.0375, 0.0188, -0.0375, 0.0375, 0, -0.0375, 0.0375, 0, -0.0375, 0.0375, 0, 0.0375, 0.0375, 0.0188, 0.0375, 0.0073, 0.0938, 0.0073, 0.009, 0.0938, 0.0052, 0.0169, 0.0563, 0.0098, 0.0169, 0.0563, 0.0098, 0.0138, 0.0563, 0.0138, 0.0073, 0.0938, 0.0073, -0.0189, 0.0563, -0.0051, -0.0169, 0.0563, -0.0098, -0.009, 0.0938, -0.0052, -0.009, 0.0938, -0.0052, -0.01, 0.0938, -0.0027, -0.0189, 0.0563, -0.0051, -0.0196, 0.0563, 0, -0.0104, 0.0938, 0, -0.01, 0.0938, 0.0027, -0.01, 0.0938, 0.0027, -0.0189, 0.0563, 0.0051, -0.0196, 0.0563, 0, 0.01, 0.0938, -0.0027, 0.0104, 0.0938, 0, 0.01, 0.0938, 0.0027, 0.009, 0.0938, -0.0052, 0.01, 0.0938, -0.0027, 0.01, 0.0938, 0.0027, 0.009, 0.0938, -0.0052, 0.01, 0.0938, 0.0027, 0.009, 0.0938, 0.0052, 0.0073, 0.0938, -0.0073, 0.009, 0.0938, -0.0052, 0.009, 0.0938, 0.0052, 0.0073, 0.0938, -0.0073, 0.009, 0.0938, 0.0052, 0.0073, 0.0938, 0.0073, 0.0052, 0.0938, -0.009, 0.0073, 0.0938, -0.0073, 0.0073, 0.0938, 0.0073, 0.0052, 0.0938, -0.009, 0.0073, 0.0938, 0.0073, 0.0052, 0.0938, 0.009, 0.0027, 0.0938, -0.01, 0.0052, 0.0938, -0.009, 0.0052, 0.0938, 0.009, 0.0027, 0.0938, -0.01, 0.0052, 0.0938, 0.009, 0.0027, 0.0938, 0.01, 0, 0.0938, -0.0104, 0.0027, 0.0938, -0.01, 0.0027, 0.0938, 0.01, 0, 0.0938, -0.0104, 0.0027, 0.0938, 0.01, 0, 0.0938, 0.0104, -0.0027, 0.0938, -0.01, 0, 0.0938, -0.0104, 0, 0.0938, 0.0104, -0.0027, 0.0938, -0.01, 0, 0.0938, 0.0104, -0.0027, 0.0938, 0.01, -0.0052, 0.0938, -0.009, -0.0027, 0.0938, -0.01, -0.0027, 0.0938, 0.01, -0.0052, 0.0938, -0.009, -0.0027, 0.0938, 0.01, -0.0052, 0.0938, 0.009, -0.0073, 0.0938, -0.0073, -0.0052, 0.0938, -0.009, -0.0052, 0.0938, 0.009, -0.0073, 0.0938, -0.0073, -0.0052, 0.0938, 0.009, -0.0073, 0.0938, 0.0073, -0.009, 0.0938, -0.0052, -0.0073, 0.0938, -0.0073, -0.0073, 0.0938, 0.0073, -0.009, 0.0938, -0.0052, -0.0073, 0.0938, 0.0073, -0.009, 0.0938, 0.0052, -0.01, 0.0938, -0.0027, -0.009, 0.0938, -0.0052, -0.009, 0.0938, 0.0052, -0.01, 0.0938, -0.0027, -0.009, 0.0938, 0.0052, -0.01, 0.0938, 0.0027, -0.01, 0.0938, 0.0027, -0.0104, 0.0938, 0, -0.01, 0.0938, -0.0027, -0.0098, 0.0563, 0.0169, -0.0052, 0.0938, 0.009, -0.0027, 0.0938, 0.01, -0.0027, 0.0938, 0.01, -0.0051, 0.0563, 0.0189, -0.0098, 0.0563, 0.0169, 0.0051, 0.0563, 0.0189, 0.0027, 0.0938, 0.01, 0.0052, 0.0938, 0.009, 0.0052, 0.0938, 0.009, 0.0098, 0.0563, 0.0169, 0.0051, 0.0563, 0.0189, -0.0138, 0.0563, 0.0138, -0.0073, 0.0938, 0.0073, -0.0052, 0.0938, 0.009, -0.0052, 0.0938, 0.009, -0.0098, 0.0563, 0.0169, -0.0138, 0.0563, 0.0138, -0.0375, 0, 0.0375, -0.0375, 0, -0.0375, -0.0375, 0.0188, -0.0375, -0.0375, 0.0188, -0.0375, -0.0375, 0.0188, 0.0375, -0.0375, 0, 0.0375, -0.0189, 0.0563, 0.0051, -0.01, 0.0938, 0.0027, -0.009, 0.0938, 0.0052, -0.009, 0.0938, 0.0052, -0.0169, 0.0563, 0.0098, -0.0189, 0.0563, 0.0051, 0.0375, 0.0188, -0.0375, 0.0288, 0.0188, 0, 0.0278, 0.0188, -0.0074, 0.0375, 0.0188, -0.0375, 0.0278, 0.0188, -0.0074, 0.0249, 0.0188, -0.0144, 0.0375, 0.0188, -0.0375, 0.0249, 0.0188, -0.0144, 0.0203, 0.0188, -0.0203, 0.0375, 0.0188, -0.0375, 0.0203, 0.0188, -0.0203, 0.0144, 0.0188, -0.0249, 0.0375, 0.0188, -0.0375, 0.0144, 0.0188, -0.0249, 0.0074, 0.0188, -0.0278, 0.0375, 0.0188, -0.0375, 0.0074, 0.0188, -0.0278, 0, 0.0188, -0.0288, 0.0375, 0.0188, -0.0375, 0, 0.0188, -0.0288, -0.0074, 0.0188, -0.0278, 0.0375, 0.0188, -0.0375, 0.0375, 0.0188, 0.0375, 0.0288, 0.0188, 0, -0.0375, 0.0188, -0.0375, 0.0375, 0.0188, -0.0375, -0.0074, 0.0188, -0.0278, -0.0074, 0.0188, -0.0278, -0.0144, 0.0188, -0.0249, -0.0375, 0.0188, -0.0375, -0.0144, 0.0188, -0.0249, -0.0203, 0.0188, -0.0203, -0.0375, 0.0188, -0.0375, -0.0203, 0.0188, -0.0203, -0.0249, 0.0188, -0.0144, -0.0375, 0.0188, -0.0375, -0.0249, 0.0188, -0.0144, -0.0278, 0.0188, -0.0074, -0.0375, 0.0188, -0.0375, -0.0278, 0.0188, -0.0074, -0.0375, 0.0188, 0.0375, -0.0375, 0.0188, -0.0375, -0.0278, 0.0188, -0.0074, -0.0288, 0.0188, 0, -0.0375, 0.0188, 0.0375, 0.0278, 0.0188, 0.0074, 0.0288, 0.0188, 0, 0.0375, 0.0188, 0.0375, 0.0249, 0.0188, 0.0144, 0.0278, 0.0188, 0.0074, 0.0375, 0.0188, 0.0375, 0.0203, 0.0188, 0.0203, 0.0249, 0.0188, 0.0144, 0.0375, 0.0188, 0.0375, 0.0144, 0.0188, 0.0249, 0.0203, 0.0188, 0.0203, 0.0375, 0.0188, 0.0375, 0.0074, 0.0188, 0.0278, 0.0144, 0.0188, 0.0249, 0.0375, 0.0188, 0.0375, 0, 0.0188, 0.0288, 0.0074, 0.0188, 0.0278, 0.0375, 0.0188, 0.0375, -0.0074, 0.0188, 0.0278, 0, 0.0188, 0.0288, 0.0375, 0.0188, 0.0375, -0.0074, 0.0188, 0.0278, 0.0375, 0.0188, 0.0375, -0.0375, 0.0188, 0.0375, -0.0144, 0.0188, 0.0249, -0.0074, 0.0188, 0.0278, -0.0375, 0.0188, 0.0375, -0.0203, 0.0188, 0.0203, -0.0144, 0.0188, 0.0249, -0.0375, 0.0188, 0.0375, -0.0249, 0.0188, 0.0144, -0.0203, 0.0188, 0.0203, -0.0375, 0.0188, 0.0375, -0.0278, 0.0188, 0.0074, -0.0249, 0.0188, 0.0144, -0.0375, 0.0188, 0.0375, -0.0375, 0.0188, 0.0375, -0.0288, 0.0188, 0, -0.0278, 0.0188, 0.0074, 0.0074, 0.0188, 0.0278, 0.0051, 0.0563, 0.0189, 0.0098, 0.0563, 0.0169, 0.0098, 0.0563, 0.0169, 0.0144, 0.0188, 0.0249, 0.0074, 0.0188, 0.0278, 0, 0.0188, 0.0288, 0, 0.0563, 0.0196, 0.0051, 0.0563, 0.0189, 0.0051, 0.0563, 0.0189, 0.0074, 0.0188, 0.0278, 0, 0.0188, 0.0288, -0.0278, 0.0188, -0.0074, -0.0249, 0.0188, -0.0144, -0.0169, 0.0563, -0.0098, -0.0169, 0.0563, -0.0098, -0.0189, 0.0563, -0.0051, -0.0278, 0.0188, -0.0074, -0.0288, 0.0188, 0, -0.0278, 0.0188, -0.0074, -0.0189, 0.0563, -0.0051, -0.0189, 0.0563, -0.0051, -0.0196, 0.0563, 0, -0.0288, 0.0188, 0, -0.0288, 0.0188, 0, -0.0196, 0.0563, 0, -0.0189, 0.0563, 0.0051, -0.0189, 0.0563, 0.0051, -0.0278, 0.0188, 0.0074, -0.0288, 0.0188, 0, 0.0074, 0.0188, -0.0278, 0.0051, 0.0563, -0.0189, 0, 0.0563, -0.0196, 0, 0.0563, -0.0196, 0, 0.0188, -0.0288, 0.0074, 0.0188, -0.0278, 0.0144, 0.0188, 0.0249, 0.0098, 0.0563, 0.0169, 0.0138, 0.0563, 0.0138, 0.0138, 0.0563, 0.0138, 0.0203, 0.0188, 0.0203, 0.0144, 0.0188, 0.0249, 0.0138, 0.0563, 0.0138, 0.0169, 0.0563, 0.0098, 0.0249, 0.0188, 0.0144, 0.0249, 0.0188, 0.0144, 0.0203, 0.0188, 0.0203, 0.0138, 0.0563, 0.0138, -0.0249, 0.0188, -0.0144, -0.0203, 0.0188, -0.0203, -0.0138, 0.0563, -0.0138, -0.0138, 0.0563, -0.0138, -0.0169, 0.0563, -0.0098, -0.0249, 0.0188, -0.0144, -0.0278, 0.0188, 0.0074, -0.0189, 0.0563, 0.0051, -0.0169, 0.0563, 0.0098, -0.0169, 0.0563, 0.0098, -0.0249, 0.0188, 0.0144, -0.0278, 0.0188, 0.0074, -0.0144, 0.0188, -0.0249, -0.0098, 0.0563, -0.0169, -0.0138, 0.0563, -0.0138, -0.0138, 0.0563, -0.0138, -0.0203, 0.0188, -0.0203, -0.0144, 0.0188, -0.0249, 0.0144, 0.0188, -0.0249, 0.0098, 0.0563, -0.0169, 0.0051, 0.0563, -0.0189, 0.0051, 0.0563, -0.0189, 0.0074, 0.0188, -0.0278, 0.0144, 0.0188, -0.0249, 0.0203, 0.0188, -0.0203, 0.0138, 0.0563, -0.0138, 0.0098, 0.0563, -0.0169, 0.0098, 0.0563, -0.0169, 0.0144, 0.0188, -0.0249, 0.0203, 0.0188, -0.0203, -0.0144, 0.0188, 0.0249, -0.0098, 0.0563, 0.0169, -0.0051, 0.0563, 0.0189, -0.0051, 0.0563, 0.0189, -0.0074, 0.0188, 0.0278, -0.0144, 0.0188, 0.0249, -0.0249, 0.0188, 0.0144, -0.0169, 0.0563, 0.0098, -0.0138, 0.0563, 0.0138, -0.0138, 0.0563, 0.0138, -0.0203, 0.0188, 0.0203, -0.0249, 0.0188, 0.0144, 0.0169, 0.0563, -0.0098, 0.0249, 0.0188, -0.0144, 0.0278, 0.0188, -0.0074, 0.0278, 0.0188, -0.0074, 0.0189, 0.0563, -0.0051, 0.0169, 0.0563, -0.0098, -0.0203, 0.0188, 0.0203, -0.0138, 0.0563, 0.0138, -0.0098, 0.0563, 0.0169, -0.0098, 0.0563, 0.0169, -0.0144, 0.0188, 0.0249, -0.0203, 0.0188, 0.0203, 0, 0.0188, -0.0288, 0, 0.0563, -0.0196, -0.0051, 0.0563, -0.0189, -0.0051, 0.0563, -0.0189, -0.0074, 0.0188, -0.0278, 0, 0.0188, -0.0288, -0.0074, 0.0188, 0.0278, -0.0051, 0.0563, 0.0189, 0, 0.0563, 0.0196, 0, 0.0563, 0.0196, 0, 0.0188, 0.0288, -0.0074, 0.0188, 0.0278, 0.0189, 0.0563, 0.0051, 0.0196, 0.0563, 0, 0.0288, 0.0188, 0, 0.0288, 0.0188, 0, 0.0278, 0.0188, 0.0074, 0.0189, 0.0563, 0.0051, 0.0138, 0.0563, -0.0138, 0.0203, 0.0188, -0.0203, 0.0249, 0.0188, -0.0144, 0.0249, 0.0188, -0.0144, 0.0169, 0.0563, -0.0098, 0.0138, 0.0563, -0.0138, 0.0169, 0.0563, 0.0098, 0.0189, 0.0563, 0.0051, 0.0278, 0.0188, 0.0074, 0.0278, 0.0188, 0.0074, 0.0249, 0.0188, 0.0144, 0.0169, 0.0563, 0.0098, 0.0196, 0.0563, 0, 0.0189, 0.0563, -0.0051, 0.0278, 0.0188, -0.0074, 0.0278, 0.0188, -0.0074, 0.0288, 0.0188, 0, 0.0196, 0.0563, 0, -0.0074, 0.0188, -0.0278, -0.0051, 0.0563, -0.0189, -0.0098, 0.0563, -0.0169, -0.0098, 0.0563, -0.0169, -0.0144, 0.0188, -0.0249, -0.0074, 0.0188, -0.0278 ) @@ -168,6 +169,9 @@ shape = SubResource( 20 ) [node name="GoalZone" parent="Spatial/StaticBody level" instance=ExtResource( 8 )] transform = Transform( 0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, -0.000546885, -2.79064, -7.17821 ) +[node name="GroundCollision" parent="Spatial/StaticBody level" instance=ExtResource( 9 )] +transform = Transform( 6.07612, 0, 0, 0, 1, 0, 0, 0, 23.102, -0.012512, -2.87122, -3.3987 ) + [node name="StaticBody turret" type="StaticBody" parent="Spatial"] transform = Transform( 0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, 0.707107, -0.0730354, -2.66775, -2.27479 ) diff --git a/godot/scenes/objects/GroundCollision.tscn b/godot/scenes/objects/GroundCollision.tscn new file mode 100644 index 0000000..9f98830 --- /dev/null +++ b/godot/scenes/objects/GroundCollision.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=2 format=2] + +[sub_resource type="BoxShape" id=1] +extents = Vector3( 0.204438, 0.202656, 0.204615 ) + +[node name="GroundCollision" type="Area"] +collision_layer = 4 +collision_mask = 4 + +[node name="CollisionShape" type="CollisionShape" parent="."] +shape = SubResource( 1 ) -- cgit From 924cca25c4ba3f8503f2455082491d574720aaec Mon Sep 17 00:00:00 2001 From: IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> Date: Sun, 17 Jul 2022 05:19:23 +0200 Subject: removed prints --- godot/scenes/Die.gd | 4 ---- 1 file changed, 4 deletions(-) diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd index aec80a5..66eb02c 100644 --- a/godot/scenes/Die.gd +++ b/godot/scenes/Die.gd @@ -111,16 +111,12 @@ BUFFS func get_buff_from_upwards_side(): if $Plus1.get_overlapping_areas().size() > 0 || $Plus2.get_overlapping_areas().size() > 0: - print("buff: plus") return buff.stroke if $Ball1.get_overlapping_areas().size() > 0 || $Ball2.get_overlapping_areas().size() > 0: - print("buff: ball") return buff.ball if $Bounce1.get_overlapping_areas().size() > 0 || $Bounce2.get_overlapping_areas().size() > 0: - print("buff: bounce") return buff.bounce if $Phase1.get_overlapping_areas().size() > 0 || $Phase2.get_overlapping_areas().size() > 0: - print("buff: phase") return buff.phase return buff.none -- cgit