generated from krampus/template-godot4
Added Level resource type & catalog
This commit is contained in:
parent
f7acce772f
commit
47383f60b6
|
@ -3,9 +3,11 @@ UI_UNSET,unset
|
||||||
UI_LISTEN,listening...
|
UI_LISTEN,listening...
|
||||||
UI_CANCEL,Cancel
|
UI_CANCEL,Cancel
|
||||||
UI_ACCEPT,Accept
|
UI_ACCEPT,Accept
|
||||||
|
UI_START,Start!
|
||||||
UI_ON,On
|
UI_ON,On
|
||||||
UI_OFF,Off
|
UI_OFF,Off
|
||||||
UI_BACK,"⏎ Back"
|
UI_BACK,"⏎ Back"
|
||||||
|
UI_LOCKED,Locked
|
||||||
UI_GOAL,Goal!
|
UI_GOAL,Goal!
|
||||||
,
|
,
|
||||||
TITLE_START,"- Press Start -"
|
TITLE_START,"- Press Start -"
|
||||||
|
@ -23,6 +25,11 @@ TITLE_NETWORK_MULTI,"Online Multiplayer"
|
||||||
TITLE_PROFILE,Profile
|
TITLE_PROFILE,Profile
|
||||||
TITLE_CREDITS,Credits
|
TITLE_CREDITS,Credits
|
||||||
,
|
,
|
||||||
|
DM_HEADING,"Real GFOLF - Local Setup"
|
||||||
|
DM_MAP,"Select a Map"
|
||||||
|
DM_PLAYERS,Gfolfers
|
||||||
|
DM_ADD_PLAYER,"Add a Gfolfer"
|
||||||
|
DM_NAME_PLACEHOLDER,"Enter a name"
|
||||||
,
|
,
|
||||||
PAUSE_HEADING,Paused
|
PAUSE_HEADING,Paused
|
||||||
PAUSE_RESUME,Resume
|
PAUSE_RESUME,Resume
|
||||||
|
@ -124,3 +131,5 @@ BALL_PLASMA,Plasma
|
||||||
BALL_BRICK,Brick
|
BALL_BRICK,Brick
|
||||||
BALL_BEACH,"Beach Ball"
|
BALL_BEACH,"Beach Ball"
|
||||||
BALL_POWER,Powerball
|
BALL_POWER,Powerball
|
||||||
|
,
|
||||||
|
MAP_DEBUG,"Debug Island"
|
||||||
|
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
[gd_resource type="Resource" script_class="Level" load_steps=4 format=3 uid="uid://chewry1b1a28j"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dlqet1c5a7j7k" path="res://levels/debug_level/preview.jpg" id="1_1ewcj"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bm2o3mex10v11" path="res://levels/debug_level/debug_level.tscn" id="2_eu01o"]
|
||||||
|
[ext_resource type="Script" path="res://src/world/level_catalog/level.gd" id="3_83327"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("3_83327")
|
||||||
|
scene = ExtResource("2_eu01o")
|
||||||
|
level_name = "MAP_DEBUG"
|
||||||
|
preview = ExtResource("1_1ewcj")
|
|
@ -365,7 +365,7 @@ shape = SubResource("BoxShape3D_x3wvm")
|
||||||
transform = Transform3D(-0.74629, 0, -0.665621, 0, 1, 0, 0.665621, 0, -0.74629, 381.024, -0.5, 224.968)
|
transform = Transform3D(-0.74629, 0, -0.665621, 0, 1, 0, 0.665621, 0, -0.74629, 381.024, -0.5, 224.968)
|
||||||
|
|
||||||
[node name="ItemSpawner" type="Marker3D" parent="Course/WaterTable/Sailboat"]
|
[node name="ItemSpawner" type="Marker3D" parent="Course/WaterTable/Sailboat"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.73528, 0.292423, 0.248718)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 5)
|
||||||
script = ExtResource("8_5kaye")
|
script = ExtResource("8_5kaye")
|
||||||
item = ExtResource("8_3jmdx")
|
item = ExtResource("8_3jmdx")
|
||||||
amount = -1
|
amount = -1
|
||||||
|
@ -374,6 +374,7 @@ spawn_turns = 1
|
||||||
|
|
||||||
[node name="Flag" parent="Course" instance=ExtResource("13_6jtao")]
|
[node name="Flag" parent="Course" instance=ExtResource("13_6jtao")]
|
||||||
transform = Transform3D(-0.777146, 0, -0.629321, 0, 1, 0, 0.629321, 0, -0.777146, 540, 4, 452)
|
transform = Transform3D(-0.777146, 0, -0.629321, 0, 1, 0, 0.629321, 0, -0.777146, 540, 4, 452)
|
||||||
|
visible = false
|
||||||
|
|
||||||
[node name="TestSpawners" type="Node3D" parent="Course"]
|
[node name="TestSpawners" type="Node3D" parent="Course"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 228.164, 4, 274.211)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 228.164, 4, 274.211)
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dlqet1c5a7j7k"
|
||||||
|
path="res://.godot/imported/preview.jpg-00ef6b4680c54da42f46dbea949541d6.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://levels/debug_level/preview.jpg"
|
||||||
|
dest_files=["res://.godot/imported/preview.jpg-00ef6b4680c54da42f46dbea949541d6.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=true
|
||||||
|
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
|
|
@ -21,6 +21,7 @@ run/max_fps=60
|
||||||
|
|
||||||
GameRuntime="*res://src/game/game_runtime.gd"
|
GameRuntime="*res://src/game/game_runtime.gd"
|
||||||
ClubCatalog="*res://src/equipment/clubs/club_catalog.tscn"
|
ClubCatalog="*res://src/equipment/clubs/club_catalog.tscn"
|
||||||
|
LevelCatalog="*res://src/world/level/level_catalog.gd"
|
||||||
GameSettings="*res://src/game/game_settings.gd"
|
GameSettings="*res://src/game/game_settings.gd"
|
||||||
|
|
||||||
[debug]
|
[debug]
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
class_name Level extends Resource
|
||||||
|
## Container for a level scene & associated data.
|
||||||
|
|
||||||
|
## Scene file of this level.
|
||||||
|
@export var scene: PackedScene
|
||||||
|
|
||||||
|
## Name of the level (or corresponding i18n key)
|
||||||
|
@export var level_name: String
|
||||||
|
|
||||||
|
## Preview image for the level. Will be used for thumbnails.
|
||||||
|
@export var preview: Texture2D
|
||||||
|
|
||||||
|
## Global typesafe accessor for level catalog
|
||||||
|
static var catalog: LevelCatalogType:
|
||||||
|
get:
|
||||||
|
return LevelCatalog
|
|
@ -0,0 +1,4 @@
|
||||||
|
class_name LevelCatalogType extends Node
|
||||||
|
## Provides access to levels.
|
||||||
|
|
||||||
|
@export var levels: Array[Level] = []
|
|
@ -0,0 +1,9 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://cdtdvka0bssgy"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://src/world/level/level_catalog.gd" id="1_wjjeu"]
|
||||||
|
[ext_resource type="Resource" uid="uid://chewry1b1a28j" path="res://levels/debug_level/debug_island.tres" id="3_3eqbc"]
|
||||||
|
[ext_resource type="Script" path="res://src/world/level/level.gd" id="3_8lfqu"]
|
||||||
|
|
||||||
|
[node name="LevelCatalog" type="Node"]
|
||||||
|
script = ExtResource("1_wjjeu")
|
||||||
|
levels = Array[ExtResource("3_8lfqu")]([ExtResource("3_3eqbc")])
|
Loading…
Reference in New Issue