A lot of UI work....

opening slash animation
main menu
load first level
This commit is contained in:
2023-09-02 15:50:21 -07:00
parent c3d19b8e0d
commit 11a2554697
11 changed files with 465 additions and 2 deletions

12
Scenes/Main.tscn Normal file
View File

@@ -0,0 +1,12 @@
[gd_scene load_steps=5 format=3 uid="uid://vwrw05ob2caq"]
[ext_resource type="Script" path="res://Scripts/Main.cs" id="1_g4hua"]
[ext_resource type="PackedScene" uid="uid://dy3d4e6qegyjg" path="res://Scenes/TestLevel.tscn" id="2_52ghj"]
[ext_resource type="PackedScene" uid="uid://b12gq4yqc3d8i" path="res://Scenes/MainMenu.tscn" id="2_kvovw"]
[ext_resource type="PackedScene" uid="uid://c7vj45kuquma" path="res://Scenes/TestLevel2.tscn" id="3_mbufn"]
[node name="Main" type="Node"]
script = ExtResource("1_g4hua")
Levels = Array[PackedScene]([ExtResource("2_52ghj"), ExtResource("3_mbufn")])
[node name="MainMenu" parent="." instance=ExtResource("2_kvovw")]

28
Scenes/MainMenu.tscn Normal file
View File

@@ -0,0 +1,28 @@
[gd_scene load_steps=3 format=3 uid="uid://b12gq4yqc3d8i"]
[ext_resource type="Script" path="res://Scripts/MainMenu.cs" id="1_6aikc"]
[ext_resource type="PackedScene" uid="uid://cjl20bs56430j" path="res://UI/Animations/UIAnimations.tscn" id="2_erh7e"]
[node name="MainMenu" type="Node2D"]
script = ExtResource("1_6aikc")
[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Button" type="Button" parent="Control"]
layout_mode = 0
offset_left = 583.0
offset_top = 441.0
offset_right = 1155.0
offset_bottom = 645.0
text = "Play"
[node name="UIAnimations" parent="." instance=ExtResource("2_erh7e")]
[connection signal="IntroAnimationsCompleted" from="." to="." method="OnAllAnimationsFinished"]
[connection signal="pressed" from="Control/Button" to="." method="OnStartButtonPressed"]

94
Scenes/TestLevel2.tscn Normal file
View File

@@ -0,0 +1,94 @@
[gd_scene load_steps=10 format=3 uid="uid://c7vj45kuquma"]
[ext_resource type="Script" path="res://Scripts/TestLevel.cs" id="1_3m6or"]
[ext_resource type="PackedScene" uid="uid://bckd04543occ5" path="res://Levels/levelTEST.gltf" id="5_ne5tf"]
[ext_resource type="PackedScene" uid="uid://dkjdt7uq3a4j3" path="res://Scenes/TestEnemy.tscn" id="6_n5k0x"]
[sub_resource type="BoxShape3D" id="BoxShape3D_iokol"]
size = Vector3(77.2254, 10, 63.5656)
[sub_resource type="BoxShape3D" id="BoxShape3D_hr26o"]
size = Vector3(37.611, 23.269, 13.2547)
[sub_resource type="BoxShape3D" id="BoxShape3D_sjyl3"]
size = Vector3(100, 100, 18.6922)
[sub_resource type="CylinderShape3D" id="CylinderShape3D_lhgew"]
height = 7.44995
radius = 1.45911
[sub_resource type="CylinderShape3D" id="CylinderShape3D_fa41j"]
height = 4.6719
radius = 2.32337
[sub_resource type="CylinderShape3D" id="CylinderShape3D_krlem"]
height = 5.0
radius = 2.06347
[node name="Level" type="Node3D" node_paths=PackedStringArray("_spawnPoint")]
script = ExtResource("1_3m6or")
_spawnPoint = NodePath("SpawnPoint")
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0, 1, 0, -1, 0, -0.0769171, 95.2611, -32.0601)
fov = 30.0
[node name="DebugCamera" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.821149, 0.570714, 0, -0.570714, 0.821149, -0.36148, 22.6449, 10.8421)
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.931845, -0.0850834, 0.35274, -0.0909281, 0.995857, -1.47234e-08, -0.351279, -0.032074, -0.935721, -3.58319, 8.01249, 0.163277)
[node name="StaticBody3D" type="StaticBody3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -36.9892)
shape = SubResource("BoxShape3D_iokol")
[node name="CollisionShape3D3" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22.5146, 4.08253, -31.0556)
shape = SubResource("BoxShape3D_hr26o")
[node name="CollisionShape3D2" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.1248, 1.81661, -31.1077)
shape = SubResource("BoxShape3D_hr26o")
[node name="levelTEST" parent="StaticBody3D" instance=ExtResource("5_ne5tf")]
[node name="CollisionShape3D4" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 4.42545)
shape = SubResource("BoxShape3D_sjyl3")
[node name="CollisionShape3D5" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.650528, -0.488932, -78.351)
shape = SubResource("BoxShape3D_sjyl3")
[node name="CollisionShape3D6" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 46.5847, -0.977863, -37.8814)
shape = SubResource("BoxShape3D_sjyl3")
[node name="CollisionShape3D7" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -48.9058, -1.95573, -38.8643)
shape = SubResource("BoxShape3D_sjyl3")
[node name="CollisionShape3D8" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -48.9058, -1.95573, -40.25)
shape = SubResource("BoxShape3D_sjyl3")
[node name="Rock1" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.93645, 5.82082, -21.6909)
shape = SubResource("CylinderShape3D_lhgew")
[node name="Rock2" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.82773, 6.46042, -40.6232)
shape = SubResource("CylinderShape3D_fa41j")
[node name="Rock3" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(0.999841, -0.0178538, 0, 0.0178538, 0.999841, 0, 0, 0, 1, -6.84036, 6.33278, -46.1737)
shape = SubResource("CylinderShape3D_krlem")
[node name="TestEnemy" parent="." instance=ExtResource("6_n5k0x")]
transform = Transform3D(0.998405, 0.0226647, 0.0517184, -0.0544217, 0.630486, 0.77429, -0.0150588, -0.775869, 0.630714, -20.5579, 5.52246, -43.2246)
[node name="SpawnPoint" type="Marker3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, -0.757998, 6.71652, -10.4768)

8
Scripts/Main.cs Normal file
View File

@@ -0,0 +1,8 @@
using Godot;
using Godot.Collections;
public partial class Main : Node
{
[Export]
public Array<PackedScene> Levels;
}

34
Scripts/MainMenu.cs Normal file
View File

@@ -0,0 +1,34 @@
using Godot;
using System.Linq;
public partial class MainMenu : Node2D
{
private AnimationPlayer _player;
[Signal]
public delegate void IntroAnimationsCompletedEventHandler();
public override void _Ready()
{
GetParent().GetNode<TextureRect>("MainMenu/UIAnimations/LoreSplash").Show();
_player = GetTree().Root.GetNode<AnimationPlayer>("/root/Main/MainMenu/UIAnimations/AnimationPlayer");
_player.Queue("IntroLore");
}
private void OnStartButtonPressed()
{
_player.Play("FirstLevel");
Hide();
_player.AnimationFinished += OnAnimationFinished;
}
private void OnAnimationFinished(StringName animationName)
{
if (animationName == "FirstLevel")
{
var main = GetTree().Root.GetNode<Main>("Main");
var firstLevel = main.Levels.First().Instantiate();
AddChild(firstLevel);
}
}
}

View File

@@ -0,0 +1,219 @@
[gd_scene load_steps=8 format=3 uid="uid://cjl20bs56430j"]
[ext_resource type="Texture2D" uid="uid://b1ucutlpx3fnp" path="res://UI/INTRO LORE.png" id="1_f4dp3"]
[ext_resource type="Texture2D" uid="uid://haxbuoepqn2b" path="res://UI/LEVEL DROP 1.png" id="2_r3e0d"]
[sub_resource type="Animation" id="Animation_fm0re"]
resource_name = "RESET"
length = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("DissolveRect:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("FirstLevelSplash:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("DissolveRect:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("LoreSplash:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_ghusn"]
resource_name = "fade_out"
length = 3.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("DissolveRect:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_qsjit"]
resource_name = "IntroLore"
length = 10.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("DissolveRect:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 3, 7.5, 10),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("DissolveRect:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 10),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("LoreSplash:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 10),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("FirstLevelSplash:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_3u8q8"]
resource_name = "FirstLevel"
length = 5.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("DissolveRect:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("FirstLevelSplash:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 5),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("LoreSplash:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 5),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("DissolveRect:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 5),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_iabf8"]
_data = {
"FirstLevel": SubResource("Animation_3u8q8"),
"IntroLore": SubResource("Animation_qsjit"),
"RESET": SubResource("Animation_fm0re"),
"fade_out": SubResource("Animation_ghusn")
}
[node name="UIAnimations" type="CanvasLayer"]
[node name="DissolveRect" type="ColorRect" parent="."]
visible = false
modulate = Color(1, 1, 1, 0)
z_index = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
color = Color(0, 0, 0, 1)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_iabf8")
}
[node name="LoreSplash" type="TextureRect" parent="."]
visible = false
show_behind_parent = true
offset_right = 1920.0
offset_bottom = 1080.0
texture = ExtResource("1_f4dp3")
[node name="FirstLevelSplash" type="TextureRect" parent="."]
z_index = -2
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_r3e0d")

BIN
UI/INTRO LORE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

34
UI/INTRO LORE.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b1ucutlpx3fnp"
path="res://.godot/imported/INTRO LORE.png-9f0c5de7059ad6efdc55035e18ffc142.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UI/INTRO LORE.png"
dest_files=["res://.godot/imported/INTRO LORE.png-9f0c5de7059ad6efdc55035e18ffc142.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
UI/LEVEL DROP 1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://haxbuoepqn2b"
path="res://.godot/imported/LEVEL DROP 1.png-400f238971b5b1e157c191e736f20e64.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://UI/LEVEL DROP 1.png"
dest_files=["res://.godot/imported/LEVEL DROP 1.png-400f238971b5b1e157c191e736f20e64.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -11,13 +11,13 @@ config_version=5
[application] [application]
config/name="GameJam2023" config/name="GameJam2023"
run/main_scene="res://Scenes/TestLevel.tscn" run/main_scene="res://Scenes/Main.tscn"
config/features=PackedStringArray("4.1", "C#", "Forward Plus") config/features=PackedStringArray("4.1", "C#", "Forward Plus")
[display] [display]
window/size/viewport_width=1920 window/size/viewport_width=1920
window/size/viewport_height=1400 window/size/viewport_height=1080
[dotnet] [dotnet]