test title screen with meat planet

This commit is contained in:
dukegoobler 2022-12-28 20:24:20 -07:00
parent a1412c198e
commit b797c54f5d
17 changed files with 1284 additions and 19 deletions

View File

@ -0,0 +1,3 @@
source_md5="82d79a832cb895ddf29160602d1a3bac"
dest_md5="3ed030bdc4c8d1bf514194b0051bfa01"

View File

@ -0,0 +1,3 @@
source_md5="f62320f5d1e5f0d2d371cd65fcc3b0ca"
dest_md5="86422adcf00d789d63ed97ab0178a962"

View File

@ -0,0 +1,3 @@
source_md5="744d5e66ca3df1f223fcc036f13bdfc7"
dest_md5="b59224a6276e2e4232e0f40630dfa237"

View File

@ -1,4 +1,4 @@
extends AnimationPlayer extends AnimationPlayer
func _ready() -> void: func _ready() -> void:
self.play("ArmatureAction-loop") self.play("SphereAction-loop")

BIN
godot/assets/models/Material_001.material (Stored with Git LFS) Normal file

Binary file not shown.

BIN
godot/assets/models/Material_002.material (Stored with Git LFS) Normal file

Binary file not shown.

BIN
godot/assets/models/meat_planet.glb (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://assets/models/meat_planet.glb" type="PackedScene" id=1]
[ext_resource path="res://assets/models/Material_002.material" type="Material" id=2]
[ext_resource path="res://assets/models/AnimationPlayer.gd" type="Script" id=3]
[sub_resource type="Animation" id=2]
resource_name = "SphereAction-loop"
length = 10.0
loop = true
tracks/0/type = "transform"
tracks/0/path = NodePath("Sphere")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = PoolRealArray( 0, 1, -0.0390858, -0.0390858, 0.0390858, -0.0206999, -0.0206999, 0.0609526, 0.997711, 1.96091, 1.96091, 1.96091, 0.0666667, 1, -0.0390858, -0.0390858, 0.0390858, -0.0205543, -0.0205543, 0.0530486, 0.998169, 1.96091, 1.96091, 1.96091, 0.666667, 1, -0.0390858, -0.0390858, 0.0390858, -0.0166952, -0.0166952, -0.136506, 0.990358, 1.96091, 1.96091, 1.96091, 1.26667, 1, -0.0390858, -0.0390858, 0.0390858, -0.0122348, -0.0122348, -0.321143, 0.946873, 1.96091, 1.96091, 1.96091, 1.86667, 1, -0.0390858, -0.0390858, 0.0390858, -0.00733364, -0.00733364, -0.494212, 0.86928, 1.96091, 1.96091, 1.96091, 2.46667, 1, -0.0390858, -0.0390858, 0.0390858, -0.00216832, -0.00216832, -0.649478, 0.760374, 1.96091, 1.96091, 1.96091, 3.06667, 1, -0.0390858, -0.0390858, 0.0390858, 0.00307511, 0.00307511, -0.78135, 0.624078, 1.96091, 1.96091, 1.96091, 3.66667, 1, -0.0390858, -0.0390858, 0.0390858, 0.00820776, 0.00820776, -0.885076, 0.465302, 1.96091, 1.96091, 1.96091, 4.26667, 1, -0.0390858, -0.0390858, 0.0390858, 0.0130448, 0.0130448, -0.95692, 0.289765, 1.96091, 1.96091, 1.96091, 4.86667, 1, -0.0390858, -0.0390858, 0.0390858, 0.0174119, 0.0174119, -0.994294, 0.103791, 1.96091, 1.96091, 1.96091, 5.2, 1, -0.0390858, -0.0390858, 0.0390858, 0.0195659, 0.0195659, -0.999617, -0.0010536, 1.96091, 1.96091, 1.96091, 5.26667, 1, -0.0390858, -0.0390858, 0.0390858, -0.0199702, -0.0199702, 0.999359, 0.021988, 1.96091, 1.96091, 1.96091, 5.86667, 1, -0.0390858, -0.0390858, 0.0390858, -0.0231947, -0.0231947, 0.977395, 0.208863, 1.96091, 1.96091, 1.96091, 6.46667, 1, -0.0390858, -0.0390858, 0.0390858, -0.0255975, -0.0255975, 0.920805, 0.388339, 1.96091, 1.96091, 1.96091, 7.06667, 1, -0.0390858, -0.0390858, 0.0390858, -0.0270935, -0.0270935, 0.831596, 0.554057, 1.96091, 1.96091, 1.96091, 7.66667, 1, -0.0390858, -0.0390858, 0.0390858, -0.0276296, -0.0276296, 0.712927, 0.700149, 1.96091, 1.96091, 1.96091, 8.26667, 1, -0.0390858, -0.0390858, 0.0390858, -0.027187, -0.027187, 0.569003, 0.821437, 1.96091, 1.96091, 1.96091, 8.86667, 1, -0.0390858, -0.0390858, 0.0390858, -0.0257813, -0.0257813, 0.40492, 0.913625, 1.96091, 1.96091, 1.96091, 9.46667, 1, -0.0390858, -0.0390858, 0.0390858, -0.0234622, -0.0234622, 0.226494, 0.973447, 1.96091, 1.96091, 1.96091, 10, 1, -0.0390858, -0.0390858, 0.0390858, -0.0206999, -0.0206999, 0.0609527, 0.997711, 1.96091, 1.96091, 1.96091 )
[node name="meat_planet" instance=ExtResource( 1 )]
[node name="Sphere" parent="." index="0"]
transform = Transform( 1.94466, -0.236818, -0.0859438, 0.240179, 1.94466, 0.0760474, 0.0760474, -0.0859438, 1.95755, -0.0390858, -0.0390858, 0.0390858 )
material_override = ExtResource( 2 )
[node name="AnimationPlayer" parent="." index="1"]
autoplay = "SphereAction-loop"
anims/SphereAction-loop = SubResource( 2 )
script = ExtResource( 3 )

View File

@ -12,7 +12,7 @@ shadow_offset=Vector2( 7, 2 )
[buttons] [buttons]
normal=[ true, Color( 0.521569, 0.521569, 0.521569, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://assets/Button07.png", false, Color( 1, 1, 1, 1 ) ] normal=[ true, Color( 0.521569, 0.521569, 0.521569, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ]
hover=[ true, Color( 0.717647, 0.717647, 0.717647, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ] hover=[ true, Color( 0.717647, 0.717647, 0.717647, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ]
focus=[ true, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ] focus=[ true, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ]
pressed=[ false, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ] pressed=[ false, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ]

View File

@ -50,7 +50,7 @@ animation="Up and down"
[buttons] [buttons]
normal=[ false, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://assets/Button07.png", false, Color( 1, 1, 1, 1 ) ] normal=[ false, Color( 0.521569, 0.521569, 0.521569, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ]
layout=1 layout=1
fixed=true fixed=true
fixed_size=Vector2( 200, 80 ) fixed_size=Vector2( 200, 80 )

View File

@ -24,43 +24,43 @@ anchor_bottom = 1.0
theme = ExtResource( 2 ) theme = ExtResource( 2 )
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] [node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
margin_left = 408.0 margin_left = 354.0
margin_top = 193.0 margin_top = 165.0
margin_right = 616.0 margin_right = 669.0
margin_bottom = 407.0 margin_bottom = 435.0
theme = ExtResource( 4 ) theme = ExtResource( 4 )
custom_constants/separation = 10 custom_constants/separation = 10
[node name="Spacer" type="Control" parent="CenterContainer/VBoxContainer"] [node name="Spacer" type="Control" parent="CenterContainer/VBoxContainer"]
margin_right = 208.0 margin_right = 315.0
margin_bottom = 30.0 margin_bottom = 30.0
rect_min_size = Vector2( 1, 30 ) rect_min_size = Vector2( 1, 30 )
[node name="ResumeButton" type="Button" parent="CenterContainer/VBoxContainer"] [node name="ResumeButton" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 40.0 margin_top = 40.0
margin_right = 208.0 margin_right = 315.0
margin_bottom = 76.0 margin_bottom = 90.0
rect_min_size = Vector2( 208, 36 ) rect_min_size = Vector2( 208, 36 )
text = "Resume" text = "Resume"
[node name="MainMenuButton" type="Button" parent="CenterContainer/VBoxContainer"] [node name="MainMenuButton" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 86.0 margin_top = 100.0
margin_right = 208.0 margin_right = 315.0
margin_bottom = 122.0 margin_bottom = 150.0
rect_min_size = Vector2( 208, 36 ) rect_min_size = Vector2( 208, 36 )
text = "Main Menu" text = "Main Menu"
[node name="ControlsButton" type="Button" parent="CenterContainer/VBoxContainer"] [node name="ControlsButton" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 132.0 margin_top = 160.0
margin_right = 208.0 margin_right = 315.0
margin_bottom = 168.0 margin_bottom = 210.0
rect_min_size = Vector2( 208, 36 ) rect_min_size = Vector2( 208, 36 )
text = "Controls" text = "Controls"
[node name="QuitButton" type="Button" parent="CenterContainer/VBoxContainer"] [node name="QuitButton" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 178.0 margin_top = 220.0
margin_right = 208.0 margin_right = 315.0
margin_bottom = 214.0 margin_bottom = 270.0
rect_min_size = Vector2( 208, 36 ) rect_min_size = Vector2( 208, 36 )
text = "Quit" text = "Quit"

View File

@ -0,0 +1,23 @@
extends Control
func _ready():
$ButtonContainer/PlayButton.grab_focus()
func _on_PlayButton_pressed():
$MenuMusic.stop()
$BlackoutSound.play()
$ButtonContainer.visible = false
$BlackoutScreen.visible = true
var dialog = Dialogic.start("intro")
add_child(dialog)
func _on_Credits_pressed():
var dialog = Dialogic.start("credits")
add_child(dialog)
func _on_Controls_pressed():
var dialog = Dialogic.start("controls")
add_child(dialog)
func _on_QuitButton_pressed():
get_tree().quit()

View File

@ -0,0 +1,131 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://assets/models/meat_planet.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/audio/button_press.ogg" type="AudioStream" id=2]
[ext_resource path="res://assets/audio/menu_music.ogg" type="AudioStream" id=3]
[ext_resource path="res://effects/grainy_shader.tscn" type="PackedScene" id=4]
[ext_resource path="res://effects/WorldEnvironment.tscn" type="PackedScene" id=5]
[ext_resource path="res://assets/title_font.tres" type="DynamicFont" id=6]
[ext_resource path="res://assets/ui_theme.tres" type="Theme" id=7]
[ext_resource path="res://tests/test_titlescreen_planet/TitleMenu.gd" type="Script" id=8]
[node name="test_titlescreen_planet" type="Spatial"]
[node name="Camera" type="Camera" parent="."]
transform = Transform( -0.237171, -0.132924, 0.962331, -0.0204041, 0.991058, 0.131863, -0.971254, 0.0116387, -0.237763, 4.87479, 1.41359, 1.05785 )
[node name="meat_planet" parent="." instance=ExtResource( 1 )]
transform = Transform( 0.5, 0, 0, 0, 0.463143, 0.188411, 0, -0.188411, 0.463143, 0.0736001, 0.18823, -0.0757823 )
[node name="DirectionalLight" type="DirectionalLight" parent="."]
transform = Transform( 0.791944, 0.610549, 0.00734885, -0.405596, 0.517027, 0.753774, 0.456416, -0.599928, 0.657093, 3.25392, 5.38699, -0.264825 )
light_color = Color( 0.317647, 0.0156863, 0.0156863, 1 )
shadow_enabled = true
[node name="grainy_shader" parent="." instance=ExtResource( 4 )]
[node name="WorldEnvironment" parent="." instance=ExtResource( 5 )]
[node name="TitleMenu" type="Control" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -20.0
margin_top = -20.0
margin_right = 20.0
margin_bottom = 20.0
theme = ExtResource( 7 )
script = ExtResource( 8 )
[node name="Title" type="Label" parent="TitleMenu"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -512.0
margin_top = -396.0
margin_right = 172.0
margin_bottom = -332.0
rect_scale = Vector2( 1.5, 1.5 )
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 )
custom_constants/shadow_offset_x = 10
custom_fonts/font = ExtResource( 6 )
text = "MEAT MADNESS"
align = 1
[node name="ButtonContainer" type="VBoxContainer" parent="TitleMenu"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -504.0
margin_top = -52.0
margin_right = -204.0
margin_bottom = 298.0
theme = ExtResource( 7 )
custom_constants/separation = 10
[node name="PlayButton" type="Button" parent="TitleMenu/ButtonContainer"]
margin_right = 300.0
margin_bottom = 36.0
text = "Play"
[node name="Spacer" type="Control" parent="TitleMenu/ButtonContainer"]
margin_top = 46.0
margin_right = 300.0
margin_bottom = 76.0
rect_min_size = Vector2( 1, 30 )
[node name="Credits" type="Button" parent="TitleMenu/ButtonContainer"]
margin_top = 86.0
margin_right = 300.0
margin_bottom = 122.0
text = "Credits"
[node name="Spacer2" type="Control" parent="TitleMenu/ButtonContainer"]
margin_top = 132.0
margin_right = 300.0
margin_bottom = 162.0
rect_min_size = Vector2( 1, 30 )
[node name="Controls" type="Button" parent="TitleMenu/ButtonContainer"]
margin_top = 172.0
margin_right = 300.0
margin_bottom = 208.0
text = "Controls"
[node name="Spacer3" type="Control" parent="TitleMenu/ButtonContainer"]
margin_top = 218.0
margin_right = 300.0
margin_bottom = 248.0
rect_min_size = Vector2( 1, 30 )
[node name="QuitButton" type="Button" parent="TitleMenu/ButtonContainer"]
margin_top = 258.0
margin_right = 300.0
margin_bottom = 294.0
text = "Quit"
[node name="BlackoutScreen" type="CanvasLayer" parent="TitleMenu"]
layer = 2
visible = false
[node name="ColorRect" type="ColorRect" parent="TitleMenu/BlackoutScreen"]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0, 0, 0, 1 )
[node name="MenuMusic" type="AudioStreamPlayer" parent="TitleMenu"]
stream = ExtResource( 3 )
volume_db = -7.0
autoplay = true
[node name="BlackoutSound" type="AudioStreamPlayer" parent="TitleMenu"]
stream = ExtResource( 2 )
[connection signal="pressed" from="TitleMenu/ButtonContainer/PlayButton" to="TitleMenu" method="_on_PlayButton_pressed"]
[connection signal="pressed" from="TitleMenu/ButtonContainer/Credits" to="TitleMenu" method="_on_Credits_pressed"]
[connection signal="pressed" from="TitleMenu/ButtonContainer/Controls" to="TitleMenu" method="_on_Controls_pressed"]
[connection signal="pressed" from="TitleMenu/ButtonContainer/QuitButton" to="TitleMenu" method="_on_QuitButton_pressed"]