Add EventBus, SpeedRunManager, and GhostManager; implement ghost recording and playback features
This commit is contained in:
39
objects/entities/ghost_player.tscn
Normal file
39
objects/entities/ghost_player.tscn
Normal file
@@ -0,0 +1,39 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://gknrmek1jmjx"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="13_uybbp"]
|
||||
[ext_resource type="Texture2D" uid="uid://0l454rfplmqg" path="res://sprites/MrBrick_base-sheet.png" id="14_4rwar"]
|
||||
[ext_resource type="Texture2D" uid="uid://jl1gwqchhpdc" path="res://sprites/left_eye.png" id="15_qkwlh"]
|
||||
[ext_resource type="Texture2D" uid="uid://iiawtnwmeny3" path="res://sprites/right_eye.png" id="16_kt5il"]
|
||||
[ext_resource type="Texture2D" uid="uid://dhkwyv6ayb5qb" path="res://sprites/flying_ship.png" id="17_i5nnv"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_xoue7"]
|
||||
shader = ExtResource("13_uybbp")
|
||||
shader_parameter/enabled = false
|
||||
shader_parameter/tint = Color(1, 1, 1, 1)
|
||||
|
||||
[node name="Brick Player" type="Node2D"]
|
||||
|
||||
[node name="Graphics" type="Node2D" parent="."]
|
||||
modulate = Color(1, 1, 1, 0.443137)
|
||||
|
||||
[node name="Root" type="Node2D" parent="Graphics"]
|
||||
|
||||
[node name="Base" type="Sprite2D" parent="Graphics/Root"]
|
||||
material = SubResource("ShaderMaterial_xoue7")
|
||||
texture = ExtResource("14_4rwar")
|
||||
hframes = 5
|
||||
|
||||
[node name="Left Eye" type="Sprite2D" parent="Graphics/Root"]
|
||||
position = Vector2(-7, -6)
|
||||
texture = ExtResource("15_qkwlh")
|
||||
hframes = 2
|
||||
|
||||
[node name="Right Eye" type="Sprite2D" parent="Graphics/Root"]
|
||||
position = Vector2(6, -5)
|
||||
texture = ExtResource("16_kt5il")
|
||||
hframes = 2
|
||||
|
||||
[node name="Ship" type="Sprite2D" parent="Graphics"]
|
||||
visible = false
|
||||
position = Vector2(1, 7)
|
||||
texture = ExtResource("17_i5nnv")
|
8
objects/ghost_manager.tscn
Normal file
8
objects/ghost_manager.tscn
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://ckeu2eddl5b3m"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cgmuod4p2hg5h" path="res://Autoloads/GhostManager.cs" id="1_u0u02"]
|
||||
[ext_resource type="PackedScene" uid="uid://gknrmek1jmjx" path="res://objects/entities/ghost_player.tscn" id="2_jnk6u"]
|
||||
|
||||
[node name="GhostManager" type="Node"]
|
||||
script = ExtResource("1_u0u02")
|
||||
GhostPlayerScene = ExtResource("2_jnk6u")
|
26
objects/ui/speed_run_hud.tscn
Normal file
26
objects/ui/speed_run_hud.tscn
Normal file
@@ -0,0 +1,26 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://kh85xqo6j848"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://0jfdx0hufs55" path="res://scripts/UI/SpeedRunHud.cs" id="1_uwqm0"]
|
||||
|
||||
[node name="SpeedRunHud" type="Control" node_paths=PackedStringArray("_timerLabel")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_uwqm0")
|
||||
_timerLabel = NodePath("Label")
|
||||
metadata/_custom_type_script = "uid://0jfdx0hufs55"
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "00:00:00"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
uppercase = true
|
Reference in New Issue
Block a user