Set up manager and test scene

This commit is contained in:
Otto 2024-09-14 16:52:12 +03:00
parent 4d1029fa6c
commit 56de371634
6 changed files with 83 additions and 0 deletions

BIN
assets/bgm.ogg Normal file

Binary file not shown.

19
assets/bgm.ogg.import Normal file
View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://35rb6724glhc"
path="res://.godot/imported/bgm.ogg-e1728340e2c8938587d9482b715a001a.oggvorbisstr"
[deps]
source_file="res://assets/bgm.ogg"
dest_files=["res://.godot/imported/bgm.ogg-e1728340e2c8938587d9482b715a001a.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

7
entities/manager.tscn Normal file
View file

@ -0,0 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://c0jgk88bnwwbs"]
[ext_resource type="Script" path="res://scripts/manager.gd" id="1_5d7ur"]
[node name="Manager" type="Manager"]
bgm = "res://assets/bgm.ogg"
script = ExtResource("1_5d7ur")

41
entities/test.tscn Normal file
View file

@ -0,0 +1,41 @@
[gd_scene load_steps=4 format=3 uid="uid://dfvl3luba7j4"]
[ext_resource type="Texture2D" uid="uid://5hxbsfm0aa0" path="res://icon.svg" id="1_3phrh"]
[sub_resource type="GDScript" id="GDScript_axp0a"]
resource_name = "Test"
script/source = "extends Node2D
func _ready() -> void:
$ScramblingText.infinite = true
$ScramblingText.start()
func _on_timer_timeout() -> void:
$ScramblingText.infinite = false;
"
[sub_resource type="LabelSettings" id="LabelSettings_w3bnc"]
font_size = 48
[node name="Test" type="Node2D"]
script = SubResource("GDScript_axp0a")
[node name="Icon" type="Sprite2D" parent="."]
position = Vector2(534, 309)
texture = ExtResource("1_3phrh")
[node name="ScramblingText" type="ScramblingText" parent="."]
duration = 0.5
offset_right = 40.0
offset_bottom = 23.0
text = "HELLO WORLD"
label_settings = SubResource("LabelSettings_w3bnc")
[node name="Timer" type="Timer" parent="."]
wait_time = 3.0
one_shot = true
autostart = true
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]

View file

@ -11,5 +11,11 @@ config_version=5
[application] [application]
config/name="AltParty2024" config/name="AltParty2024"
run/main_scene="res://entities/manager.tscn"
config/features=PackedStringArray("4.3", "Forward Plus") config/features=PackedStringArray("4.3", "Forward Plus")
config/icon="res://icon.svg" config/icon="res://icon.svg"
[debug]
gdscript/warnings/unassigned_variable=2
gdscript/warnings/untyped_declaration=2

10
scripts/manager.gd Normal file
View file

@ -0,0 +1,10 @@
extends Manager
var scene1: PackedScene = preload("res://entities/test.tscn")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
register_scene(scene1);
start_audio();
set_scene(0);