show level name, best time, and thumbnail (#3)
now thumbnails need to be made
This commit is contained in:
parent
59bed24acd
commit
71441a9335
7 changed files with 153 additions and 12 deletions
|
@ -10,8 +10,18 @@
|
|||
[sub_resource type="GDScript" id="GDScript_mqwxc"]
|
||||
script/source = "extends Level
|
||||
|
||||
var cycle := 0
|
||||
|
||||
func _init() -> void:
|
||||
self.id = \"forest\"
|
||||
self.thumbnail = load(\"res://levels/forest/thumbnail.png\")
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
var moving_ring: Ring = $Rings/Ring18
|
||||
if !moving_ring.collected:
|
||||
if moving_ring.position.y < 55 or moving_ring.position.y > 65:
|
||||
cycle += 1
|
||||
moving_ring.position.y += 0.5 if cycle % 2 else -0.5
|
||||
|
||||
func _on_player_velocity_change(new_velocity: float) -> void:
|
||||
self.velocity = new_velocity
|
||||
|
|
BIN
levels/forest/thumbnail.png
Normal file
BIN
levels/forest/thumbnail.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 195 KiB |
34
levels/forest/thumbnail.png.import
Normal file
34
levels/forest/thumbnail.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dhyxogc13hnbe"
|
||||
path="res://.godot/imported/thumbnail.png-6909560b6205778a3cb325a584af7ca5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://levels/forest/thumbnail.png"
|
||||
dest_files=["res://.godot/imported/thumbnail.png-6909560b6205778a3cb325a584af7ca5.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
|
|
@ -6,13 +6,16 @@ signal completed
|
|||
|
||||
## Lowercase, spaceless name of the level
|
||||
var id: String
|
||||
var thumbnail: CompressedTexture2D
|
||||
var music: Music
|
||||
var velocity: float = 0.0
|
||||
var rings: Array[Ring] = []
|
||||
var finished_rings_count: int = 0
|
||||
var velocity: float = 0.0
|
||||
|
||||
func _init() -> void:
|
||||
assert(len(id) > 0, self.name + " has no id!")
|
||||
|
||||
func _ready() -> void:
|
||||
assert(len(id) > 0, self.name + " has no id!")
|
||||
var children = get_children()
|
||||
for child in children:
|
||||
if is_instance_of(child, Music):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue