Fixed merge errors
This commit is contained in:
BIN
Assets/Audio/Music/Level1.mp3
Normal file
BIN
Assets/Audio/Music/Level1.mp3
Normal file
Binary file not shown.
19
Assets/Audio/Music/Level1.mp3.import
Normal file
19
Assets/Audio/Music/Level1.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://dq1cnjtb2whma"
|
||||
path="res://.godot/imported/Level1.mp3-30f3515015616548e8974daad27cbb3e.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Audio/Music/Level1.mp3"
|
||||
dest_files=["res://.godot/imported/Level1.mp3-30f3515015616548e8974daad27cbb3e.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Assets/Audio/Music/MainMenu.mp3
Normal file
BIN
Assets/Audio/Music/MainMenu.mp3
Normal file
Binary file not shown.
19
Assets/Audio/Music/MainMenu.mp3.import
Normal file
19
Assets/Audio/Music/MainMenu.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://dsxarngq2a8bh"
|
||||
path="res://.godot/imported/MainMenu.mp3-6986c2f1bdc31a4ee60b698abd6d4879.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Audio/Music/MainMenu.mp3"
|
||||
dest_files=["res://.godot/imported/MainMenu.mp3-6986c2f1bdc31a4ee60b698abd6d4879.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
Assets/Audio/Music/MainTheme.mmpz
Normal file
BIN
Assets/Audio/Music/MainTheme.mmpz
Normal file
Binary file not shown.
43
Assets/Scenes/Dialogue.tscn
Normal file
43
Assets/Scenes/Dialogue.tscn
Normal file
@@ -0,0 +1,43 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cpopl1smrtneb"]
|
||||
|
||||
[ext_resource type="Texture2D" path="res://Assets/Sprites/UI/DialogueBG.png" id="1_cdjwm"]
|
||||
[ext_resource type="Script" uid="uid://b7a4ty2lbfxan" path="res://Assets/Scripts/LevelScripts/Dialogue.cs" id="1_qqmmm"]
|
||||
[ext_resource type="Texture2D" path="res://Assets/Sprites/DialogueIcons/DialogueIconSign.png" id="2_jtluh"]
|
||||
[ext_resource type="FontFile" path="res://Assets/MedodicaRegular.otf" id="3_qqmmm"]
|
||||
|
||||
[node name="Dialogue" type="Node2D"]
|
||||
z_index = 10
|
||||
script = ExtResource("1_qqmmm")
|
||||
|
||||
[node name="BG" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, 50)
|
||||
texture = ExtResource("1_cdjwm")
|
||||
|
||||
[node name="Icon" type="Sprite2D" parent="."]
|
||||
position = Vector2(-72, 50)
|
||||
texture = ExtResource("2_jtluh")
|
||||
|
||||
[node name="SpeakerName" type="RichTextLabel" parent="."]
|
||||
self_modulate = Color(0, 0, 0, 1)
|
||||
offset_left = -42.0
|
||||
offset_top = 21.0
|
||||
offset_right = 100.0
|
||||
offset_bottom = 35.253662
|
||||
scale = Vector2(1.0795577, 1.0795577)
|
||||
theme_override_fonts/normal_font = ExtResource("3_qqmmm")
|
||||
text = "SpeakerName"
|
||||
scroll_active = false
|
||||
autowrap_mode = 0
|
||||
|
||||
[node name="Dialogue" type="RichTextLabel" parent="."]
|
||||
self_modulate = Color(0, 0, 0, 1)
|
||||
offset_left = -41.000004
|
||||
offset_top = 40.0
|
||||
offset_right = 99.901855
|
||||
offset_bottom = 75.974945
|
||||
scale = Vector2(1.0006965, 1.0006965)
|
||||
theme_override_fonts/normal_font = ExtResource("3_qqmmm")
|
||||
text = "If you are seeing this then the game is broken and you should report it. Thanks!"
|
||||
scroll_active = false
|
||||
scroll_following = true
|
||||
scroll_following_visible_characters = true
|
||||
57
Assets/Scenes/DialogueInteractable.tscn
Normal file
57
Assets/Scenes/DialogueInteractable.tscn
Normal file
@@ -0,0 +1,57 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://d0uyeoheppepk"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cl8sq2b2lp4a5" path="res://Assets/Scripts/LevelScripts/LevelDialogueInitiator.cs" id="1_atu2j"]
|
||||
[ext_resource type="Texture2D" path="res://Assets/Sprites/InteractionIndicator-sheet.png" id="2_txs58"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tqsam"]
|
||||
atlas = ExtResource("2_txs58")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_32yid"]
|
||||
atlas = ExtResource("2_txs58")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hlnxx"]
|
||||
atlas = ExtResource("2_txs58")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_otjle"]
|
||||
atlas = ExtResource("2_txs58")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tegj5"]
|
||||
atlas = ExtResource("2_txs58")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_yy124"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tqsam")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_32yid")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hlnxx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_otjle")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tegj5")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 10.0
|
||||
}]
|
||||
|
||||
[node name="DialogueInteractable" type="Sprite2D"]
|
||||
script = ExtResource("1_atu2j")
|
||||
metadata/Dialogue = PackedStringArray("Sign|DialogueIconSign|This is a test.")
|
||||
|
||||
[node name="InteractionIndicator" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_yy124")
|
||||
autoplay = "default"
|
||||
frame = 3
|
||||
frame_progress = 0.5094823
|
||||
30
Assets/Scenes/MenusAndLevels/Credits.tscn
Normal file
30
Assets/Scenes/MenusAndLevels/Credits.tscn
Normal file
@@ -0,0 +1,30 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bvjmefswaveya"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/Scripts/CommonScripts/UISelector.cs" id="2_66bl7"]
|
||||
[ext_resource type="Script" uid="uid://b28bv2l2asbpy" path="res://Assets/Scripts/CommonScripts/ChangeMenuInitiator.cs" id="4_gp05m"]
|
||||
|
||||
[node name="Htp" type="Node2D"]
|
||||
|
||||
[node name="UISelector" type="Node2D" parent="."]
|
||||
script = ExtResource("2_66bl7")
|
||||
|
||||
[node name="BackButton" type="Sprite2D" parent="UISelector"]
|
||||
z_index = 1
|
||||
position = Vector2(0, 65)
|
||||
script = ExtResource("4_gp05m")
|
||||
metadata/TargetMenu = "MainMenu"
|
||||
metadata/TransitionType = "FAST"
|
||||
|
||||
[node name="SelectionIndicator" type="Sprite2D" parent="UISelector"]
|
||||
z_index = 1
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="."]
|
||||
offset_left = -154.0
|
||||
offset_top = -84.0
|
||||
offset_right = 154.0
|
||||
offset_bottom = 52.0
|
||||
text = "Created by ...
|
||||
"
|
||||
scroll_active = false
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -1,3 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://bbngncnb2xeov"]
|
||||
|
||||
[node name="EnemyTestLevel" type="Node2D"]
|
||||
29
Assets/Scenes/MenusAndLevels/HTP.tscn
Normal file
29
Assets/Scenes/MenusAndLevels/HTP.tscn
Normal file
@@ -0,0 +1,29 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bl0eanc4ptrip"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/Scripts/CommonScripts/UISelector.cs" id="2_htcbc"]
|
||||
[ext_resource type="Script" uid="uid://b28bv2l2asbpy" path="res://Assets/Scripts/CommonScripts/ChangeMenuInitiator.cs" id="4_htcbc"]
|
||||
|
||||
[node name="Htp" type="Node2D"]
|
||||
|
||||
[node name="UISelector" type="Node2D" parent="."]
|
||||
script = ExtResource("2_htcbc")
|
||||
|
||||
[node name="BackButton" type="Sprite2D" parent="UISelector"]
|
||||
z_index = 1
|
||||
position = Vector2(0, 65)
|
||||
script = ExtResource("4_htcbc")
|
||||
metadata/TargetMenu = "MainMenu"
|
||||
metadata/TransitionType = "FAST"
|
||||
|
||||
[node name="SelectionIndicator" type="Sprite2D" parent="UISelector"]
|
||||
z_index = 1
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="."]
|
||||
offset_left = -154.0
|
||||
offset_top = -84.0
|
||||
offset_right = 154.0
|
||||
offset_bottom = 52.0
|
||||
text = "No quema cuh"
|
||||
scroll_active = false
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
482
Assets/Scenes/MenusAndLevels/Level1.tscn
Normal file
482
Assets/Scenes/MenusAndLevels/Level1.tscn
Normal file
File diff suppressed because one or more lines are too long
83
Assets/Scenes/MenusAndLevels/LevelSelectionMenu.tscn
Normal file
83
Assets/Scenes/MenusAndLevels/LevelSelectionMenu.tscn
Normal file
@@ -0,0 +1,83 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dk1egdpjl31r"]
|
||||
|
||||
[ext_resource type="Script" path="res://Assets/Scripts/CommonScripts/LevelSelectionManager.cs" id="1_4n03f"]
|
||||
[ext_resource type="PackedScene" uid="uid://bffiqliomwkmo" path="res://Assets/Scenes/Persistant/Camera.tscn" id="1_j4u47"]
|
||||
[ext_resource type="Script" path="res://Assets/Scripts/CommonScripts/UISelector.cs" id="2_xaene"]
|
||||
[ext_resource type="Script" uid="uid://b28bv2l2asbpy" path="res://Assets/Scripts/CommonScripts/ChangeMenuInitiator.cs" id="4_xaene"]
|
||||
|
||||
[node name="LevelSelectionMenu" type="Node2D"]
|
||||
script = ExtResource("1_4n03f")
|
||||
|
||||
[node name="Camera" parent="." instance=ExtResource("1_j4u47")]
|
||||
|
||||
[node name="UISelector" type="Node2D" parent="."]
|
||||
script = ExtResource("2_xaene")
|
||||
|
||||
[node name="Level1" type="Sprite2D" parent="UISelector"]
|
||||
position = Vector2(-79, -40)
|
||||
script = ExtResource("4_xaene")
|
||||
metadata/TargetMenu = "Level1"
|
||||
metadata/TransitionType = "SLOW"
|
||||
|
||||
[node name="Level2" type="Sprite2D" parent="UISelector"]
|
||||
visible = false
|
||||
position = Vector2(0, -40)
|
||||
script = ExtResource("4_xaene")
|
||||
metadata/TargetMenu = "Level2"
|
||||
metadata/TransitionType = "SLOW"
|
||||
|
||||
[node name="Level3" type="Sprite2D" parent="UISelector"]
|
||||
visible = false
|
||||
position = Vector2(80, -40)
|
||||
script = ExtResource("4_xaene")
|
||||
metadata/TargetMenu = "Level3"
|
||||
metadata/TransitionType = "SLOW"
|
||||
|
||||
[node name="Level4" type="Sprite2D" parent="UISelector"]
|
||||
visible = false
|
||||
position = Vector2(-40, 40)
|
||||
script = ExtResource("4_xaene")
|
||||
metadata/TargetMenu = "Level4"
|
||||
metadata/TransitionType = "SLOW"
|
||||
|
||||
[node name="Level5" type="Sprite2D" parent="UISelector"]
|
||||
visible = false
|
||||
position = Vector2(40, 40)
|
||||
script = ExtResource("4_xaene")
|
||||
metadata/TargetMenu = "Level5"
|
||||
metadata/TransitionType = "SLOW"
|
||||
|
||||
[node name="BackButton" type="Sprite2D" parent="UISelector"]
|
||||
position = Vector2(127, 65)
|
||||
script = ExtResource("4_xaene")
|
||||
metadata/TargetMenu = "MainMenu"
|
||||
metadata/TransitionType = "FAST"
|
||||
|
||||
[node name="SelectionIndicator" type="Sprite2D" parent="UISelector"]
|
||||
z_index = 1
|
||||
|
||||
[node name="FakeButtons" type="Node2D" parent="."]
|
||||
|
||||
[node name="Level2" type="Sprite2D" parent="FakeButtons"]
|
||||
position = Vector2(0, -40)
|
||||
|
||||
[node name="LockIcon" type="Sprite2D" parent="FakeButtons/Level2"]
|
||||
self_modulate = Color(1, 1, 1, 0.47058824)
|
||||
|
||||
[node name="Level3" type="Sprite2D" parent="FakeButtons"]
|
||||
position = Vector2(80, -40)
|
||||
|
||||
[node name="LockIcon" type="Sprite2D" parent="FakeButtons/Level3"]
|
||||
self_modulate = Color(1, 1, 1, 0.47058824)
|
||||
|
||||
[node name="Level4" type="Sprite2D" parent="FakeButtons"]
|
||||
position = Vector2(-40, 40)
|
||||
|
||||
[node name="LockIcon" type="Sprite2D" parent="FakeButtons/Level4"]
|
||||
self_modulate = Color(1, 1, 1, 0.47058824)
|
||||
|
||||
[node name="Level5" type="Sprite2D" parent="FakeButtons"]
|
||||
position = Vector2(40, 40)
|
||||
|
||||
[node name="LockIcon" type="Sprite2D" parent="FakeButtons/Level5"]
|
||||
self_modulate = Color(1, 1, 1, 0.47058824)
|
||||
@@ -1,31 +1,20 @@
|
||||
[gd_scene format=3 uid="uid://c8bxl0uohy535"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c8bxl0uohy535"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://hqp23lmk336m" path="res://icon.svg" id="1_rmvno"]
|
||||
[ext_resource type="Script" uid="uid://c8ibbithifum2" path="res://Assets/Scripts/CommonScripts/SceneChangeButton.cs" id="2_u3d4d"]
|
||||
|
||||
[node name="MainMenu" type="Node2D"]
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="."]
|
||||
offset_left = -65.0
|
||||
offset_top = -21.0
|
||||
offset_right = 64.0
|
||||
offset_bottom = 19.0
|
||||
text = "Main Menu"
|
||||
scroll_active = false
|
||||
autowrap_trim_flags = 0
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
[node name="Delete" type="Sprite2D" parent="."]
|
||||
rotation = 0.7296006
|
||||
texture = ExtResource("1_rmvno")
|
||||
|
||||
[node name="ExampleButton1" type="Button" parent="."]
|
||||
offset_top = 47.0
|
||||
offset_right = 8.0
|
||||
offset_bottom = 55.0
|
||||
[node name="Button" type="Button" parent="."]
|
||||
offset_left = -126.0
|
||||
offset_top = 113.0
|
||||
offset_right = -25.0
|
||||
offset_bottom = 144.0
|
||||
scale = Vector2(2.5243824, 2.5243824)
|
||||
script = ExtResource("2_u3d4d")
|
||||
|
||||
[node name="ExampleButton2" type="Button" parent="."]
|
||||
offset_left = 77.0
|
||||
offset_top = 47.0
|
||||
offset_right = 85.0
|
||||
offset_bottom = 55.0
|
||||
|
||||
[node name="ExampleButton3" type="Button" parent="."]
|
||||
offset_left = -65.0
|
||||
offset_top = 47.0
|
||||
offset_right = -57.0
|
||||
offset_bottom = 55.0
|
||||
[connection signal="pressed" from="Button" to="Button" method="_on_pressed"]
|
||||
|
||||
251
Assets/Scenes/MenusAndLevels/MenuChangeManager.tscn
Normal file
251
Assets/Scenes/MenusAndLevels/MenuChangeManager.tscn
Normal file
@@ -0,0 +1,251 @@
|
||||
[gd_scene load_steps=18 format=3 uid="uid://r24ppggva18y"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dedv5j5tvb2gk" path="res://Assets/Scripts/CommonScripts/MenuChangeManager.cs" id="1_uevlq"]
|
||||
[ext_resource type="Texture2D" path="res://Assets/Sprites/Blueberry-sheet.png" id="2_3tdrs"]
|
||||
[ext_resource type="Script" uid="uid://cugofqkikepb2" path="res://Assets/Scripts/CommonScripts/TipManager.cs" id="3_ei4c6"]
|
||||
[ext_resource type="FontFile" path="res://Assets/MedodicaRegular.otf" id="3_jtn6d"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_uktqf"]
|
||||
resource_name = "LoadingAnimation"
|
||||
length = 3.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("BlackBG:color")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1.0066667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("BlackBG/LoadingIcon:self_modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0.41, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("BlackBG/TipManager:self_modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0.42, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_3tdrs"]
|
||||
resource_name = "LoadOut"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("BlackBG:color")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("BlackBG/LoadingIcon:self_modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.67),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("BlackBG/TipManager:self_modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.66),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_btj4p"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("../BlackBG:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(-320, -180)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("BlackBG:color")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("BlackBG/LoadingIcon:self_modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("BlackBG/TipManager:self_modulate")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_rvq0g"]
|
||||
_data = {
|
||||
&"LoadIn": SubResource("Animation_uktqf"),
|
||||
&"LoadOut": SubResource("Animation_3tdrs"),
|
||||
&"RESET": SubResource("Animation_btj4p")
|
||||
}
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ei4c6"]
|
||||
atlas = ExtResource("2_3tdrs")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jtn6d"]
|
||||
atlas = ExtResource("2_3tdrs")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_uktqf"]
|
||||
atlas = ExtResource("2_3tdrs")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_btj4p"]
|
||||
atlas = ExtResource("2_3tdrs")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rvq0g"]
|
||||
atlas = ExtResource("2_3tdrs")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wg4yt"]
|
||||
atlas = ExtResource("2_3tdrs")
|
||||
region = Rect2(80, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_meiur"]
|
||||
atlas = ExtResource("2_3tdrs")
|
||||
region = Rect2(96, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0xegj"]
|
||||
atlas = ExtResource("2_3tdrs")
|
||||
region = Rect2(112, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_n7wom"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ei4c6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jtn6d")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_uktqf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_btj4p")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_rvq0g")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wg4yt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_meiur")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0xegj")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 8.0
|
||||
}]
|
||||
|
||||
[node name="MenuChangeManager" type="Node2D"]
|
||||
z_index = 1000
|
||||
|
||||
[node name="MenuChangeManager" type="Node" parent="."]
|
||||
script = ExtResource("1_uevlq")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_rvq0g")
|
||||
}
|
||||
autoplay = "LoadIn"
|
||||
|
||||
[node name="BlackBG" type="ColorRect" parent="."]
|
||||
self_modulate = Color(0, 0, 0, 1)
|
||||
z_index = 1000
|
||||
z_as_relative = false
|
||||
offset_left = -320.0
|
||||
offset_top = -180.0
|
||||
offset_right = 320.0
|
||||
offset_bottom = 180.0
|
||||
color = Color(0, 0, 0, 0)
|
||||
|
||||
[node name="LoadingIcon" type="AnimatedSprite2D" parent="BlackBG"]
|
||||
position = Vector2(465, 256)
|
||||
sprite_frames = SubResource("SpriteFrames_n7wom")
|
||||
autoplay = "default"
|
||||
frame = 3
|
||||
frame_progress = 0.5269981
|
||||
|
||||
[node name="TipManager" type="RichTextLabel" parent="BlackBG"]
|
||||
layout_mode = 0
|
||||
offset_left = 170.00002
|
||||
offset_top = 101.0
|
||||
offset_right = 475.95636
|
||||
offset_bottom = 244.97948
|
||||
scale = Vector2(1.0001426, 1.0001426)
|
||||
theme_override_fonts/normal_font = ExtResource("3_jtn6d")
|
||||
text = "Tip: Example"
|
||||
scroll_active = false
|
||||
autowrap_mode = 2
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
script = ExtResource("3_ei4c6")
|
||||
14
Assets/Scenes/Persistant/CommonData.tscn
Normal file
14
Assets/Scenes/Persistant/CommonData.tscn
Normal file
@@ -0,0 +1,14 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bn5opy6atakg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://nc2lwwjistrq" path="res://Assets/Scripts/CommonScripts/CommonData.cs" id="1_2g1ed"]
|
||||
[ext_resource type="AudioStream" uid="uid://dq1cnjtb2whma" path="res://Assets/Audio/Music/Level1.mp3" id="2_rv15i"]
|
||||
[ext_resource type="Script" uid="uid://b28bv2l2asbpy" path="res://Assets/Scripts/CommonScripts/ChangeMenuInitiator.cs" id="3_m0c8c"]
|
||||
|
||||
[node name="CommonData" type="Node"]
|
||||
script = ExtResource("1_2g1ed")
|
||||
|
||||
[node name="ChangeMenuInitiator" type="Node" parent="."]
|
||||
script = ExtResource("3_m0c8c")
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("2_rv15i")
|
||||
6
Assets/Scenes/Persistant/LevelManager.tscn
Normal file
6
Assets/Scenes/Persistant/LevelManager.tscn
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://j3d4u4gjxncu"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://i8yvg41jip3n" path="res://Assets/Scripts/LevelScripts/LevelManager.cs" id="1_ndy45"]
|
||||
|
||||
[node name="LevelManager" type="Node"]
|
||||
script = ExtResource("1_ndy45")
|
||||
66
Assets/Scenes/Player.tscn
Normal file
66
Assets/Scenes/Player.tscn
Normal file
@@ -0,0 +1,66 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dr8qdk10uy0o4"]
|
||||
|
||||
[ext_resource type="Texture2D" path="res://Assets/Sprites/PlayerWalk.png" id="1_3e2tf"]
|
||||
[ext_resource type="Script" uid="uid://batcpr6rxhyb2" path="res://Assets/Scripts/PlayerScripts/PlayerMover.cs" id="1_b2ifw"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_b2ifw"]
|
||||
size = Vector2(12, 28)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_b2ifw"]
|
||||
atlas = ExtResource("1_3e2tf")
|
||||
region = Rect2(0, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_aee6e"]
|
||||
atlas = ExtResource("1_3e2tf")
|
||||
region = Rect2(16, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_e5q2x"]
|
||||
atlas = ExtResource("1_3e2tf")
|
||||
region = Rect2(32, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mifcl"]
|
||||
atlas = ExtResource("1_3e2tf")
|
||||
region = Rect2(48, 0, 16, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_2thea"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_b2ifw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_aee6e")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_e5q2x")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mifcl")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 8.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0ccr5"]
|
||||
size = Vector2(12, 28)
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
collision_layer = 2
|
||||
script = ExtResource("1_b2ifw")
|
||||
|
||||
[node name="AreaDetector" type="Area2D" parent="."]
|
||||
collision_mask = 60
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="AreaDetector"]
|
||||
position = Vector2(-1, -14)
|
||||
shape = SubResource("RectangleShape2D_b2ifw")
|
||||
|
||||
[node name="WalkingAnimation" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(0, -16)
|
||||
sprite_frames = SubResource("SpriteFrames_2thea")
|
||||
frame_progress = 0.24983363
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(-1, -14)
|
||||
shape = SubResource("RectangleShape2D_0ccr5")
|
||||
10
Assets/Scenes/SlowField.tscn
Normal file
10
Assets/Scenes/SlowField.tscn
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://btgikedw0lg47"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_xtorf"]
|
||||
|
||||
[node name="SlowZone" type="Area2D"]
|
||||
collision_layer = 32
|
||||
linear_damp = 100.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_xtorf")
|
||||
@@ -1,11 +1,14 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class ChangeMenuInitiator : Node2D
|
||||
public partial class ChangeMenuInitiator : Node
|
||||
{
|
||||
float TransitionDelay = 0; // seconds
|
||||
Node cameFrom;
|
||||
|
||||
public void ChangeMenu(string type, string destination)
|
||||
public void ChangeMenu(string type, string destination, Node cameFromInput)
|
||||
{
|
||||
cameFromInput = cameFrom;
|
||||
if (type == "SLOW")
|
||||
{
|
||||
// Load the menu change manager
|
||||
@@ -41,8 +44,8 @@ public partial class ChangeMenuInitiator : Node2D
|
||||
{
|
||||
if (arg == "LoadIn")
|
||||
{
|
||||
// Delete current scene (MAKE SURE THE PARENT OF THE PARENT OF THIS SCRIPT IS THE SCENE YOU CAME FROM)
|
||||
GetParent().GetParent().QueueFree();
|
||||
// Delete current scene (MAKE SURE THE PARENT OF THE PARENT OF THIS SCRIPT IS THE SCENE)
|
||||
cameFrom.QueueFree();
|
||||
}
|
||||
}
|
||||
|
||||
1
Assets/Scripts/CommonScripts/ChangeMenuInitiator.cs.uid
Normal file
1
Assets/Scripts/CommonScripts/ChangeMenuInitiator.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b28bv2l2asbpy
|
||||
@@ -9,19 +9,9 @@ public partial class CommonData : Node
|
||||
// Level information
|
||||
public string CurrentLevel;
|
||||
|
||||
// Level high scores
|
||||
public int Level1HighScore = 0;
|
||||
public int Level2HighScore = 0;
|
||||
public int Level3HighScore = 0;
|
||||
public int Level4HighScore = 0;
|
||||
public int Level5HighScore = 0;
|
||||
public int Level6HighScore = 0;
|
||||
public int Level7HighScore = 0;
|
||||
public int Level8HighScore = 0;
|
||||
public int Level9HighScore = 0;
|
||||
public int Level10HighScore = 0;
|
||||
public int Level11HighScore = 0;
|
||||
|
||||
// Player information
|
||||
public float CurrentHealth;
|
||||
public float MaxHealth = 100;
|
||||
|
||||
// Levels Completed
|
||||
public HashSet<string> LevelsCompleted = new HashSet<string>();
|
||||
|
||||
1
Assets/Scripts/CommonScripts/CommonData.cs.uid
Normal file
1
Assets/Scripts/CommonScripts/CommonData.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://nc2lwwjistrq
|
||||
37
Assets/Scripts/CommonScripts/LevelSelectionManager.cs
Normal file
37
Assets/Scripts/CommonScripts/LevelSelectionManager.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class LevelSelectionManager : Node2D
|
||||
{
|
||||
Dictionary<string, string> ConnectionRef = new Dictionary<string, string>();
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
// Create Dictionary
|
||||
ConnectionRef.Add("Level1", "Level2");
|
||||
ConnectionRef.Add("Level2", "Level3");
|
||||
ConnectionRef.Add("Level3", "Level4");
|
||||
ConnectionRef.Add("Level4", "Level5");
|
||||
|
||||
// Disable all levels but the first
|
||||
foreach (Node2D arg in GetNode("UISelector").GetChildren())
|
||||
{
|
||||
if (ConnectionRef.ContainsValue(arg.Name))
|
||||
arg.SetProcess(false);
|
||||
}
|
||||
|
||||
// Edit buttons according to what is completed
|
||||
foreach (string arg in GetTree().Root.GetNode<CommonData>("CommonData").LevelsCompleted)
|
||||
{
|
||||
if (ConnectionRef.ContainsKey(arg))
|
||||
{
|
||||
// Remove fake button
|
||||
GetNode("FakeButtons").GetNode<Node2D>(ConnectionRef[arg]).Visible = false;
|
||||
// Add real button
|
||||
GetNode("UISelector").GetNode<Node2D>(ConnectionRef[arg]).Visible = true;
|
||||
GetNode("UISelector").GetNode<Node2D>(ConnectionRef[arg]).SetProcess(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://bqqpex5a35ttm
|
||||
80
Assets/Scripts/CommonScripts/MenuChangeManager.cs
Normal file
80
Assets/Scripts/CommonScripts/MenuChangeManager.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class MenuChangeManager : Node
|
||||
{
|
||||
public string TargetMenu;
|
||||
public float TransitionDelay = 10;
|
||||
bool TimerLock = true;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
// Setup timer
|
||||
if (TransitionDelay == 10)
|
||||
{
|
||||
GD.Randomize();
|
||||
TransitionDelay += GD.Randf() * 7; // seconds maximum - 10
|
||||
}
|
||||
// Connect to signal
|
||||
GetParent().GetNode<AnimationPlayer>("AnimationPlayer").AnimationFinished += TimerUnlock;
|
||||
|
||||
// Stop audio
|
||||
GetTree().Root.GetNode<CommonData>("CommonData").StopMusic();
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (TransitionDelay < 0.0f) // Manage waiting
|
||||
{
|
||||
TransitionDelay = 1;
|
||||
TimerLock = true;
|
||||
SecondHalf();
|
||||
}
|
||||
if (TimerLock == false) // Dectiment timer
|
||||
{
|
||||
TransitionDelay -= (float)delta;
|
||||
}
|
||||
}
|
||||
|
||||
void TimerUnlock(StringName arg)
|
||||
{
|
||||
if (arg == "LoadIn")
|
||||
{
|
||||
TimerLock = false;
|
||||
}
|
||||
}
|
||||
|
||||
void SecondHalf()
|
||||
{
|
||||
//GetTree().Root.GetNode("Camera").GetNode<CameraMovement>("Camera2D").FixedPosition = GetTree().Root.GetNode("Camera").GetNode<Node2D>("Camera2D").Position;
|
||||
GetTree().Root.GetNode("Camera").GetNode<CameraMovement>("Camera2D").TeleportCamera(Vector2.Zero);
|
||||
|
||||
// Load the target menu
|
||||
var scene = GD.Load<PackedScene>($"res://Assets/Scenes/MenusAndLevels/{TargetMenu}.tscn");
|
||||
var inst = scene.Instantiate();
|
||||
GetTree().Root.AddChild(inst);
|
||||
|
||||
// Play audio (AUDIO NAME NEEDS TO BE THE SAME NAME AS THE SCENE)
|
||||
if (ResourceLoader.Exists($"res://Assets/Audio/Music/{TargetMenu}.mp3"))
|
||||
GetTree().Root.GetNode<CommonData>("CommonData").PlayMusic(TargetMenu);
|
||||
|
||||
// Check if the player is there and if it is not then make the camera mode FIXED
|
||||
var RootChildren = GetTree().Root.GetChildren();
|
||||
if (RootChildren[2].HasNode("Player") == false)
|
||||
GetTree().Root.GetNode("Camera").SetMeta("CameraMode", "FIXED");
|
||||
|
||||
GetParent().GetNode<AnimationPlayer>("AnimationPlayer").CurrentAnimation = "LoadOut";
|
||||
|
||||
// Check when animation is finished
|
||||
GetParent().GetNode<AnimationPlayer>("AnimationPlayer").AnimationFinished += DeleteMenu;
|
||||
}
|
||||
|
||||
void DeleteMenu(StringName arg)
|
||||
{
|
||||
if (arg == "LoadOut")
|
||||
{
|
||||
// Delete change manager
|
||||
GetParent().QueueFree();
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Assets/Scripts/CommonScripts/MenuChangeManager.cs.uid
Normal file
1
Assets/Scripts/CommonScripts/MenuChangeManager.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dedv5j5tvb2gk
|
||||
10
Assets/Scripts/CommonScripts/SceneChangeButton.cs
Normal file
10
Assets/Scripts/CommonScripts/SceneChangeButton.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class SceneChangeButton : Button
|
||||
{
|
||||
void _on_pressed()
|
||||
{
|
||||
GetTree().Root.GetNode("CommonData").GetNode<ChangeMenuInitiator>("ChangeMenuInitiator").ChangeMenu("HTP", "slow",GetParent());
|
||||
}
|
||||
}
|
||||
1
Assets/Scripts/CommonScripts/SceneChangeButton.cs.uid
Normal file
1
Assets/Scripts/CommonScripts/SceneChangeButton.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c8ibbithifum2
|
||||
@@ -7,9 +7,7 @@ public partial class TipManager : RichTextLabel
|
||||
|
||||
string[] TipList =
|
||||
{
|
||||
"Example Tip 1",
|
||||
"Example Tip 2",
|
||||
"Example Tip 3"
|
||||
"Example Tip"
|
||||
};
|
||||
|
||||
public override void _Ready()
|
||||
|
||||
1
Assets/Scripts/CommonScripts/TipManager.cs.uid
Normal file
1
Assets/Scripts/CommonScripts/TipManager.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cugofqkikepb2
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
|
||||
public partial class UI : Node2D
|
||||
{
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
GlobalPosition = GetTree().Root.GetNode("Camera").GetNode<Node2D>("Camera2D").GlobalPosition;
|
||||
|
||||
1
Assets/Scripts/CommonScripts/UI.cs.uid
Normal file
1
Assets/Scripts/CommonScripts/UI.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ddyi5usr6poda
|
||||
46
Assets/Scripts/CommonScripts/UISelector.cs
Normal file
46
Assets/Scripts/CommonScripts/UISelector.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class UISelector : Node2D
|
||||
{
|
||||
List<Node2D> AvailableOptions = new List<Node2D>();
|
||||
public Node2D SelectedOption;
|
||||
int SelectedKey = 0;
|
||||
Node2D SelectionIndicator;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
// Set up selection indicator
|
||||
SelectionIndicator = GetNode<Node2D>("SelectionIndicator");
|
||||
|
||||
// Set up list of options
|
||||
foreach (Node2D option in GetChildren())
|
||||
{
|
||||
if (option != SelectionIndicator)
|
||||
AvailableOptions.Add(option);
|
||||
}
|
||||
|
||||
// Set defaults
|
||||
SelectedOption = AvailableOptions[SelectedKey];
|
||||
SelectionIndicator.Position = SelectedOption.Position;
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
// Select next option
|
||||
if(Input.IsActionJustPressed("menu_right") && SelectedKey < AvailableOptions.Count - 1)
|
||||
{
|
||||
SelectedKey += 1;
|
||||
}
|
||||
// Select previous option
|
||||
if(Input.IsActionJustPressed("menu_left") && SelectedKey != 0)
|
||||
{
|
||||
SelectedKey -= 1;
|
||||
|
||||
}
|
||||
|
||||
SelectedOption = AvailableOptions[SelectedKey];
|
||||
SelectionIndicator.Position = SelectedOption.Position;
|
||||
}
|
||||
}
|
||||
1
Assets/Scripts/CommonScripts/UISelector.cs.uid
Normal file
1
Assets/Scripts/CommonScripts/UISelector.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b02hgywj3kck
|
||||
116
Assets/Scripts/LevelScripts/CameraMovement.cs
Normal file
116
Assets/Scripts/LevelScripts/CameraMovement.cs
Normal file
@@ -0,0 +1,116 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
public partial class CameraMovement : Camera2D
|
||||
{
|
||||
// Node Refrence
|
||||
Node2D Target;
|
||||
Node2D Player;
|
||||
|
||||
// Player Info
|
||||
Vector2 PreviousPlayerPosition;
|
||||
|
||||
// Camera Properties
|
||||
float CameraVerticalOffset = -20;
|
||||
float CameraHorizontalOffset = 20;
|
||||
float CameraMovementSpeed = 4;
|
||||
|
||||
// Tweening
|
||||
float CameraTweenRate;
|
||||
float MaxCameraTweenRate = 150f;
|
||||
float MinCameraTweenRate = 0.5f;
|
||||
//float MaxCameraDistance = 15f;
|
||||
|
||||
// Mode
|
||||
public string CameraMode; // "FOLLOW" (Follows player), "FIXED" (Stay at fixed position)
|
||||
public Vector2 FixedPosition;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
// Find Nodes
|
||||
Target = this.GetParent().GetNode<Node2D>("CameraTarget");
|
||||
|
||||
// Set initial camera position
|
||||
CameraMode = (string)GetParent().GetMeta("CameraMode");
|
||||
Position = Target.Position;
|
||||
FixedPosition = new Vector2(0,0);
|
||||
PreviousPlayerPosition = new Vector2(0,0);
|
||||
}
|
||||
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
// Update Mode
|
||||
CameraMode = (string)GetParent().GetMeta("CameraMode");
|
||||
// Change Target position depending on current mode
|
||||
switch (CameraMode)
|
||||
{
|
||||
case "FOLLOW":
|
||||
// Set the player variable if it equals null
|
||||
var RootChildren = GetTree().Root.GetChildren();
|
||||
if (Player == null)
|
||||
{
|
||||
if (RootChildren[2].HasNode("Player"))
|
||||
Player = RootChildren[2].GetNode<Node2D>("Player");
|
||||
}
|
||||
else // If player exists
|
||||
{
|
||||
// Calculate the player's change in position
|
||||
float DeltaPosition = Player.Position[0] - PreviousPlayerPosition.X;
|
||||
// Place target in the direction the player is moving for enhanced visibility
|
||||
if (DeltaPosition > 0) // Right side of player
|
||||
{
|
||||
Target.Position = new Vector2(Player.Position[0] + CameraHorizontalOffset, Player.Position[1] + CameraVerticalOffset);
|
||||
}
|
||||
if (DeltaPosition < 0) // Left side of player
|
||||
{
|
||||
Target.Position = new Vector2(Player.Position[0] - CameraHorizontalOffset, Player.Position[1] + CameraVerticalOffset);
|
||||
}
|
||||
if (DeltaPosition == 0) // Center on player when not moving
|
||||
{
|
||||
Target.Position = new Vector2(Player.Position[0], Player.Position[1] + CameraVerticalOffset);
|
||||
}
|
||||
PreviousPlayerPosition = Player.Position;
|
||||
}
|
||||
break;
|
||||
case "FIXED":
|
||||
// Change position of Camera Target if it is not at the desired fixed position
|
||||
if (Target.Position != FixedPosition)
|
||||
{
|
||||
Target.Position = FixedPosition;
|
||||
}
|
||||
|
||||
Player = null;
|
||||
|
||||
break;
|
||||
default: // Does nothing just required
|
||||
break;
|
||||
}
|
||||
// Tween camera to Camera Target's position
|
||||
CameraTweenRate = (float)Math.Pow(Position.DistanceTo(Target.Position), 2) / 10f;
|
||||
// Ensure the Tween Rate stays between the Max and Min values
|
||||
if (CameraTweenRate > MaxCameraTweenRate)
|
||||
{
|
||||
CameraTweenRate = MaxCameraTweenRate;
|
||||
}
|
||||
if (CameraTweenRate < MinCameraTweenRate)
|
||||
{
|
||||
CameraTweenRate = MinCameraTweenRate;
|
||||
}
|
||||
// Move Camera
|
||||
Vector2 MovementDirection = (Target.Position - Position).Normalized();
|
||||
Position += MovementDirection * CameraMovementSpeed * CameraTweenRate * (float)delta;
|
||||
}
|
||||
|
||||
public void TeleportCamera(Vector2 TargetPosition)
|
||||
{
|
||||
GetParent().GetNode<Node2D>("CameraTarget").Position = TargetPosition;
|
||||
Position = TargetPosition;
|
||||
FixedPosition = TargetPosition;
|
||||
}
|
||||
|
||||
}
|
||||
1
Assets/Scripts/LevelScripts/CameraMovement.cs.uid
Normal file
1
Assets/Scripts/LevelScripts/CameraMovement.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://co5myvo1u4qn7
|
||||
@@ -3,7 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
// Instantiate this scene and send all data to SetupDailogue()
|
||||
// arg contains the speaker, speaker icon, and the sentance for example "Sign|GruntCalm|This is a test."
|
||||
// arg contains the speaker and the sentance for example "Sign|This is a test."
|
||||
|
||||
public partial class Dialogue : Node2D
|
||||
{
|
||||
|
||||
1
Assets/Scripts/LevelScripts/Dialogue.cs.uid
Normal file
1
Assets/Scripts/LevelScripts/Dialogue.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b7a4ty2lbfxan
|
||||
35
Assets/Scripts/LevelScripts/LevelDialogueInitiator.cs
Normal file
35
Assets/Scripts/LevelScripts/LevelDialogueInitiator.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class LevelDialogueInitiator : Node2D
|
||||
{
|
||||
string[] Dialogue; // Each element in the array is the name of the speaker and the dialogue seperated by a | (ex "Sign|This is a test message.")
|
||||
float MaxInteractDistance = 30;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
// Get dialogue from the metadata
|
||||
Dialogue = (string[])GetMeta("Dialogue");
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (GetParent().GetParent().HasNode("Player"))
|
||||
{
|
||||
if (Position.DistanceTo(GetParent().GetParent().GetNode<Node2D>("Player").Position) <= MaxInteractDistance)
|
||||
GetNode<AnimatedSprite2D>("InteractionIndicator").Visible = true;
|
||||
else
|
||||
GetNode<AnimatedSprite2D>("InteractionIndicator").Visible = false;
|
||||
}
|
||||
|
||||
if (Input.IsActionJustPressed("interact") && GetTree().Root.GetNode("Camera").GetNode("Camera2D").HasNode("Dialogue") == false && Position.DistanceTo(GetParent().GetParent().GetNode<Node2D>("Player").Position) <= MaxInteractDistance)
|
||||
{
|
||||
// Instantiate scene
|
||||
var scene = GD.Load<PackedScene>($"res://Assets/Scenes/Dialogue.tscn");
|
||||
var inst = scene.Instantiate();
|
||||
GetTree().Root.GetNode("Camera").GetNode("Camera2D").AddChild(inst);
|
||||
// Send Data
|
||||
GetTree().Root.GetNode("Camera").GetNode("Camera2D").GetNode<Dialogue>("Dialogue").SetupDialogue(Dialogue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://cl8sq2b2lp4a5
|
||||
@@ -1,8 +1,6 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
// Designed by Jojackman1
|
||||
|
||||
public partial class LevelManager : Node
|
||||
{
|
||||
Node2D StartNode;
|
||||
@@ -12,6 +10,8 @@ public partial class LevelManager : Node
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
GetTree().Root.GetNode<CommonData>("CommonData").CurrentHealth = GetTree().Root.GetNode<CommonData>("CommonData").MaxHealth;
|
||||
|
||||
StartNode = GetParent().GetNode<Node2D>("StartNode");
|
||||
EndNode = GetParent().GetNode<Node2D>("EndNode");
|
||||
Player = GetParent().GetNode<Node2D>("Player");
|
||||
@@ -30,7 +30,7 @@ public partial class LevelManager : Node
|
||||
if (EndType == "nothing")
|
||||
{
|
||||
// Death
|
||||
if ()
|
||||
if (GetTree().Root.GetNode<CommonData>("CommonData").CurrentHealth <= 0)
|
||||
{
|
||||
EndManager("Death");
|
||||
EndType = "Death";
|
||||
@@ -48,9 +48,25 @@ public partial class LevelManager : Node
|
||||
{
|
||||
switch (EndType)
|
||||
{
|
||||
case "Death": // Player Dies
|
||||
case "Death": // Player Died
|
||||
//Player.QueueFree();
|
||||
// Go back to main menu (Replace with proper ending screen and then send back to main menu)
|
||||
GetNode<ChangeMenuInitiator>("ChangeMenuInitiator").ChangeMenu("FAST", "MainMenu", GetParent());
|
||||
break;
|
||||
case "Success": // Successfully make it to the end of the levels
|
||||
case "Success": // Success
|
||||
// Remove the player to stop checking
|
||||
//Player.QueueFree();
|
||||
// Add level completed to the hash set
|
||||
GetTree().Root.GetNode<CommonData>("CommonData").LevelsCompleted.Add(GetParent().Name);
|
||||
// Play exit animation
|
||||
GetParent().GetNode("ScreenAnimations").GetNode("LevelCompleteAssets").GetNode<AnimationPlayer>("LevelComplete").CurrentAnimation = "default";
|
||||
GetParent().GetNode("ScreenAnimations").GetNode<Node2D>("LevelCompleteAssets").Reparent(GetTree().Root.GetNode("Camera").GetNode("Camera2D"));
|
||||
GetTree().Root.GetNode("Camera").GetNode("Camera2D").GetNode<Node2D>("LevelCompleteAssets").GlobalPosition = GetTree().Root.GetNode("Camera").GetNode<Node2D>("Camera2D").GlobalPosition;
|
||||
GetTree().Root.GetNode("Camera").GetNode("Camera2D").GetNode<Node2D>("LevelCompleteAssets").Visible = true;
|
||||
// Go to exit cutscene after exit animation is complete
|
||||
var LevelName = (string)GetParent().Name;
|
||||
var LevelNumber = LevelName.Split("Level");
|
||||
GetNode<ChangeMenuInitiator>("ChangeMenuInitiator").ChangeMenu("SLOW", $"Cutscenes/ExitCutscene{LevelNumber[0]}", GetParent());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
1
Assets/Scripts/LevelScripts/LevelManager.cs.uid
Normal file
1
Assets/Scripts/LevelScripts/LevelManager.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://i8yvg41jip3n
|
||||
87
Assets/Scripts/PlayerScripts/PlayerMover.cs
Normal file
87
Assets/Scripts/PlayerScripts/PlayerMover.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
public partial class PlayerMover : CharacterBody2D
|
||||
{
|
||||
// Movement Variables
|
||||
public float Speed = 80.0f;
|
||||
public float JumpVelocity = -250.0f;
|
||||
|
||||
// Animation Refrences
|
||||
AnimatedSprite2D WalkingAnimation;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
// Object refrences
|
||||
WalkingAnimation = GetNode<AnimatedSprite2D>("WalkingAnimation");
|
||||
// Entering/Exiting various area 2D's
|
||||
GetNode<Area2D>("AreaDetector").AreaEntered += AreaEnteredHandler;
|
||||
GetNode<Area2D>("AreaDetector").AreaExited += AreaExitedHandler;
|
||||
// Change camera
|
||||
GetTree().Root.GetNode("Camera").SetMeta("CameraMode", "FOLLOW");
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
|
||||
Vector2 velocity = Velocity;
|
||||
|
||||
// Add gravity.
|
||||
if (!IsOnFloor())
|
||||
{
|
||||
velocity += GetGravity() * (float)delta * 0.8f;
|
||||
}
|
||||
|
||||
// Handle Jump.
|
||||
if (Input.IsActionJustPressed("jump") && IsOnFloor())
|
||||
{
|
||||
velocity.Y = JumpVelocity;
|
||||
}
|
||||
|
||||
// Get the input direction and set velocity
|
||||
if (Input.IsActionPressed("move_left")) // move left
|
||||
{
|
||||
velocity.X = -Speed;
|
||||
WalkingAnimation.FlipH = true;
|
||||
|
||||
if (WalkingAnimation.IsPlaying() == false) // Play Animation
|
||||
WalkingAnimation.Play();
|
||||
}
|
||||
else if (Input.IsActionPressed("move_right")) // move right
|
||||
{
|
||||
velocity.X = Speed;
|
||||
WalkingAnimation.FlipH = false;
|
||||
|
||||
if (WalkingAnimation.IsPlaying() == false) // Play Animation
|
||||
WalkingAnimation.Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
velocity.X = 0;
|
||||
WalkingAnimation.Stop();
|
||||
}
|
||||
|
||||
Velocity = velocity;
|
||||
MoveAndSlide();
|
||||
}
|
||||
|
||||
void AreaEnteredHandler(Area2D arg)
|
||||
{
|
||||
string name = arg.Name;
|
||||
if (name.Contains("SlowField"))
|
||||
{
|
||||
Speed = 20.0f;
|
||||
JumpVelocity = -180.0f;
|
||||
}
|
||||
}
|
||||
void AreaExitedHandler(Area2D arg)
|
||||
{
|
||||
string name = arg.Name;
|
||||
if (name.Contains("SlowField"))
|
||||
{
|
||||
Speed = 80.0f;
|
||||
JumpVelocity = -250.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Assets/Scripts/PlayerScripts/PlayerMover.cs.uid
Normal file
1
Assets/Scripts/PlayerScripts/PlayerMover.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://batcpr6rxhyb2
|
||||
BIN
Assets/Sprites/PlayerWalk.ase
Normal file
BIN
Assets/Sprites/PlayerWalk.ase
Normal file
Binary file not shown.
23
README.md
23
README.md
@@ -1,22 +1 @@
|
||||
# FRACTUREPOINT
|
||||
|
||||
#Developers
|
||||
###Jacob Weedman
|
||||
Enemy/Boss Programming, Enemy/Boss Concepts, Concept Artist, Promotional Artist
|
||||
|
||||
###Jordan Knox
|
||||
Story, Character/Enemy/NPC Concepts, Level Design, Level Artist, Social Media
|
||||
|
||||
###Tyson Gardner
|
||||
UI/Settings/Miscellaneous/Level Programming
|
||||
|
||||
###Joshua Murphey
|
||||
Character Weapons/Abilities Programming
|
||||
|
||||
###Emma
|
||||
Player Sprites, Enemy Sprites, Boss Sprites, Backgrounds
|
||||
|
||||
#Project Info
|
||||
Made in Godot Engine Mono 4.5
|
||||
Pathfinding curtosy of the A* project.
|
||||
2025-2026
|
||||
#fracturepoint
|
||||
|
||||
7
fracturepoint.csproj
Normal file
7
fracturepoint.csproj
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Godot.NET.Sdk/4.5.1">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net9.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
19
fracturepoint.sln
Normal file
19
fracturepoint.sln
Normal file
@@ -0,0 +1,19 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fracturepoint", "fracturepoint.csproj", "{F526D7B0-F91F-446A-8519-4FD5ABD82B96}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
ExportDebug|Any CPU = ExportDebug|Any CPU
|
||||
ExportRelease|Any CPU = ExportRelease|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F526D7B0-F91F-446A-8519-4FD5ABD82B96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F526D7B0-F91F-446A-8519-4FD5ABD82B96}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F526D7B0-F91F-446A-8519-4FD5ABD82B96}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||
{F526D7B0-F91F-446A-8519-4FD5ABD82B96}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||
{F526D7B0-F91F-446A-8519-4FD5ABD82B96}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||
{F526D7B0-F91F-446A-8519-4FD5ABD82B96}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://chhsyc65jertm"
|
||||
uid="uid://hqp23lmk336m"
|
||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
||||
@@ -10,13 +10,22 @@ config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="FRACTUREPOINT"
|
||||
config/features=PackedStringArray("4.5", "GL Compatibility")
|
||||
config/name="fracturepoint"
|
||||
run/main_scene="uid://bn5opy6atakg"
|
||||
config/features=PackedStringArray("4.5", "C#", "GL Compatibility")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=640
|
||||
window/size/viewport_height=360
|
||||
window/size/mode=3
|
||||
window/stretch/mode="viewport"
|
||||
window/stretch/scale_mode="integer"
|
||||
|
||||
[dotnet]
|
||||
|
||||
project/assembly_name="FRACTUREPOINT"
|
||||
project/assembly_name="fracturepoint"
|
||||
|
||||
[input]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user