diff options
author | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-17 05:35:23 +0200 |
---|---|---|
committer | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-17 05:35:23 +0200 |
commit | b8d6ba924c60c13bca838655b1fa876758c47ed7 (patch) | |
tree | 51d11b6f432e7ffba009e05be4e279789295f5f8 /godot | |
parent | ee5124e87ac68b3628fcaa7f08a56fa139449014 (diff) | |
download | 2022-b8d6ba924c60c13bca838655b1fa876758c47ed7.tar.gz 2022-b8d6ba924c60c13bca838655b1fa876758c47ed7.tar.bz2 2022-b8d6ba924c60c13bca838655b1fa876758c47ed7.zip |
fixed a bunch of stuff
Diffstat (limited to 'godot')
-rw-r--r-- | godot/scenes/Die.gd | 1 | ||||
-rw-r--r-- | godot/scenes/Die.tscn | 116 | ||||
-rw-r--r-- | godot/scenes/Game.gd | 2 | ||||
-rw-r--r-- | godot/scenes/Game.tscn | 23 |
4 files changed, 123 insertions, 19 deletions
diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd index f7d51d5..6f061b5 100644 --- a/godot/scenes/Die.gd +++ b/godot/scenes/Die.gd @@ -76,6 +76,7 @@ func _input(event): die_launch_force = die_launch_force_direction * clamp(die_launch_force_magnitude, 0, die_launch_force_magnitude_max) * die_launch_force_multiplier self.apply_central_impulse(die_launch_force) $PowerUI/PowerBar.hide() + _game.add_stroke() #Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) # add one to counter diff --git a/godot/scenes/Die.tscn b/godot/scenes/Die.tscn index 2887ddc..2afc4f3 100644 --- a/godot/scenes/Die.tscn +++ b/godot/scenes/Die.tscn @@ -1,8 +1,13 @@ -[gd_scene load_steps=5 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] +[sub_resource type="PhysicsMaterial" id=3] + +[sub_resource type="ConvexPolygonShape" id=2] +points = PoolVector3Array( -0.0850063, -0.879389, -0.0282584, 0.0288993, 0.929375, 0.0289349, 0.0288993, 0.929375, -0.0289349, 0.929367, -0.0289314, 0.0289314, -0.0289784, -0.0289338, 0.929338, -0.929369, 0.028929, 0.028929, 0.0288993, -0.0289349, -0.929375, 0.0288993, -0.929375, 0.0289349, -0.0850063, 0.0282584, -0.879389, 0.0282247, 0.084959, 0.87945, 0.857489, 0.056933, -0.0855785, -0.879454, -0.0849424, 0.0282549, 0.0570775, -0.885814, -0.0571088, 0.0570775, -0.0571088, 0.885814, -0.0571532, 0.885743, -0.0571043, -0.0571532, 0.885743, 0.0571043, 0.0570775, 0.0571088, -0.885814, -0.885806, -0.057097, -0.057097, 0.879446, 0.0849494, 0.0282572, 0.857335, -0.0571018, -0.0855632, -0.0571532, 0.0571043, 0.885743, -0.0571532, -0.885743, 0.0571043, -0.885806, 0.057097, -0.057097, -0.0571532, -0.0571043, -0.885743, 0.0570775, 0.0571088, 0.885814, -0.0571532, -0.885743, -0.0571043, -0.0571532, 0.0571043, -0.885743, 0.0570775, -0.885814, 0.0571088, 0.0570775, 0.885814, 0.0571088, -0.0571532, -0.0571043, 0.885743, -0.885806, 0.057097, 0.057097, 0.0570775, 0.885814, -0.0571088, 0.0570775, -0.0571088, -0.885814, 0.857335, -0.0571018, 0.0855632, -0.885806, -0.057097, 0.057097, 0.857489, 0.056933, 0.0855785, 0.929425, 0.0287513, -0.0289333, 0.929367, -0.0289314, -0.0289314, -0.0289784, 0.929338, -0.0289338, 0.0288993, 0.0289349, -0.929375, -0.929369, -0.028929, -0.028929, -0.0283039, -0.87942, -0.0849561, 0.084933, 0.0282608, 0.879461, -0.0289784, 0.929338, 0.0289338, -0.0289784, -0.0289338, -0.929338, -0.0289784, 0.0289338, 0.929338, 0.0288993, -0.0289349, 0.929375, 0.0288993, -0.929375, -0.0289349, -0.0289784, -0.929338, 0.0289338, -0.929369, 0.028929, -0.028929, -0.0283039, 0.0849561, -0.87942, -0.879454, -0.0282549, 0.0849424, 0.879512, 0.0280816, 0.0849558, 0.879446, -0.0849494, -0.0282572, -0.0282988, -0.822574, 0.141805, 0.17021, 0.0280745, -0.794261, -0.879454, 0.0849424, -0.0282549, -0.0283039, 0.87942, 0.0849561, 0.0282247, 0.87945, -0.084959, 0.0282247, -0.084959, -0.87945, -0.879454, -0.0282549, -0.0849424, -0.0850063, 0.0282584, 0.879389, -0.0850063, 0.879389, 0.0282584, 0.084933, -0.0282608, 0.879461 ) + [sub_resource type="ArrayMesh" id=1] resource_name = "W8_Cone" surfaces/0 = { @@ -18,21 +23,38 @@ surfaces/0 = { "vertex_count": 68 } -[sub_resource type="ConvexPolygonShape" id=2] -points = PoolVector3Array( -0.0850063, -0.879389, -0.0282584, 0.0288993, 0.929375, 0.0289349, 0.0288993, 0.929375, -0.0289349, 0.929367, -0.0289314, 0.0289314, -0.0289784, -0.0289338, 0.929338, -0.929369, 0.028929, 0.028929, 0.0288993, -0.0289349, -0.929375, 0.0288993, -0.929375, 0.0289349, -0.0850063, 0.0282584, -0.879389, 0.0282247, 0.084959, 0.87945, 0.857489, 0.056933, -0.0855785, -0.879454, -0.0849424, 0.0282549, 0.0570775, -0.885814, -0.0571088, 0.0570775, -0.0571088, 0.885814, -0.0571532, 0.885743, -0.0571043, -0.0571532, 0.885743, 0.0571043, 0.0570775, 0.0571088, -0.885814, -0.885806, -0.057097, -0.057097, 0.879446, 0.0849494, 0.0282572, 0.857335, -0.0571018, -0.0855632, -0.0571532, 0.0571043, 0.885743, -0.0571532, -0.885743, 0.0571043, -0.885806, 0.057097, -0.057097, -0.0571532, -0.0571043, -0.885743, 0.0570775, 0.0571088, 0.885814, -0.0571532, -0.885743, -0.0571043, -0.0571532, 0.0571043, -0.885743, 0.0570775, -0.885814, 0.0571088, 0.0570775, 0.885814, 0.0571088, -0.0571532, -0.0571043, 0.885743, -0.885806, 0.057097, 0.057097, 0.0570775, 0.885814, -0.0571088, 0.0570775, -0.0571088, -0.885814, 0.857335, -0.0571018, 0.0855632, -0.885806, -0.057097, 0.057097, 0.857489, 0.056933, 0.0855785, 0.929425, 0.0287513, -0.0289333, 0.929367, -0.0289314, -0.0289314, -0.0289784, 0.929338, -0.0289338, 0.0288993, 0.0289349, -0.929375, -0.929369, -0.028929, -0.028929, -0.0283039, -0.87942, -0.0849561, 0.084933, 0.0282608, 0.879461, -0.0289784, 0.929338, 0.0289338, -0.0289784, -0.0289338, -0.929338, -0.0289784, 0.0289338, 0.929338, 0.0288993, -0.0289349, 0.929375, 0.0288993, -0.929375, -0.0289349, -0.0289784, -0.929338, 0.0289338, -0.929369, 0.028929, -0.028929, -0.0283039, 0.0849561, -0.87942, -0.879454, -0.0282549, 0.0849424, 0.879512, 0.0280816, 0.0849558, 0.879446, -0.0849494, -0.0282572, -0.0282988, -0.822574, 0.141805, 0.17021, 0.0280745, -0.794261, -0.879454, 0.0849424, -0.0282549, -0.0283039, 0.87942, 0.0849561, 0.0282247, 0.87945, -0.084959, 0.0282247, -0.084959, -0.87945, -0.879454, -0.0282549, -0.0849424, -0.0850063, 0.0282584, 0.879389, -0.0850063, 0.879389, 0.0282584, 0.084933, -0.0282608, 0.879461 ) +[sub_resource type="SphereShape" id=4] + +[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 ) script = ExtResource( 1 ) -[node name="MeshDie" type="MeshInstance" parent="."] +[node name="CollisionShape" type="CollisionShape" parent="."] +shape = SubResource( 2 ) + +[node name="Cone" type="MeshInstance" parent="CollisionShape"] mesh = SubResource( 1 ) -skeleton = NodePath("../..") +skeleton = NodePath("../../..") material/0 = null -[node name="CollisionShapeDie" type="CollisionShape" parent="."] -shape = SubResource( 2 ) +[node name="BallShape" type="CollisionShape" parent="."] +visible = false +shape = SubResource( 4 ) +disabled = true + +[node name="Ball" type="MeshInstance" parent="BallShape"] +mesh = SubResource( 5 ) +skeleton = NodePath("../..") +material/0 = null [node name="CamRoot" type="Spatial" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 15.0578, 0 ) [node name="Horizontal" type="Spatial" parent="CamRoot"] @@ -40,3 +62,83 @@ shape = SubResource( 2 ) [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 + +[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 ) + +[node name="PowerUI" type="Control" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_right = 40.0 +margin_bottom = 40.0 + +[node name="PowerBar" type="ProgressBar" parent="PowerUI"] +margin_left = 64.0 +margin_top = 44.0 +margin_right = 1185.0 +margin_bottom = 153.0 diff --git a/godot/scenes/Game.gd b/godot/scenes/Game.gd index f53c39a..58c9e27 100644 --- a/godot/scenes/Game.gd +++ b/godot/scenes/Game.gd @@ -24,10 +24,10 @@ func _ready(): # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): if Input.is_action_just_pressed("ui_cancel"): + close_scoreboard() get_tree().paused = true $PausePopup.show() Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) - close_scoreboard() diff --git a/godot/scenes/Game.tscn b/godot/scenes/Game.tscn index 0796a83..60a965d 100644 --- a/godot/scenes/Game.tscn +++ b/godot/scenes/Game.tscn @@ -10,6 +10,18 @@ [node name="Game" type="Spatial"] script = ExtResource( 1 ) +[node name="Scoreboard" parent="." instance=ExtResource( 5 )] +pause_mode = 2 +visible = false +margin_right = -0.319946 +margin_bottom = 0.47998 + +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 6 ) +autoplay = true + +[node name="Level1" parent="." instance=ExtResource( 2 )] + [node name="PausePopup" type="Control" parent="."] pause_mode = 2 visible = false @@ -57,16 +69,5 @@ margin_right = 360.0 margin_bottom = 343.0 text = "Quit" -[node name="Scoreboard" parent="." instance=ExtResource( 5 )] -visible = false -margin_right = -0.319946 -margin_bottom = 0.47998 - -[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] -stream = ExtResource( 6 ) -autoplay = true - -[node name="Level1" parent="." instance=ExtResource( 2 )] - [connection signal="pressed" from="PausePopup/Panel/VBoxContainer/ResumeButton" to="." method="_on_ResumeButton_pressed"] [connection signal="pressed" from="PausePopup/Panel/VBoxContainer/QuitButton" to="." method="_on_QuitButton_pressed"] |