- improving textures
- adding coins (no shop jet) - adding skin changing [no gui jet - fixing loops for deleting stuff]
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 563 B |
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 587 B |
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 565 B After Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 607 B |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 553 B |
|
@ -1,33 +1,22 @@
|
||||||
extends TextureRect
|
extends TextureRect
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$AnimationPlayer.play_backwards("out-in")
|
$AnimationPlayer.play_backwards("out-in")
|
||||||
hide()
|
hide()
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
|
||||||
pass
|
|
||||||
#global_position.x = get_viewport().get_visible_rect().size.x * 0.5
|
|
||||||
|
|
||||||
func _on_duck_gameover() -> void:
|
func _on_duck_gameover() -> void:
|
||||||
$AnimationPlayer.play_backwards("out-in")
|
$AnimationPlayer.pop_in()
|
||||||
$"../../Audio/GameOver".play()
|
$"../../Audio/GameOver".play()
|
||||||
$"../../Audio/Gui-in".play()
|
|
||||||
show()
|
|
||||||
$Restart.grab_focus()
|
$Restart.grab_focus()
|
||||||
print($"/root/Global".hiscore)
|
print($"/root/Global".hiscore)
|
||||||
if %ScoreContainer.get_score() > $"/root/Global".hiscore:
|
if %ScoreContainer.get_score() > $"/root/Global".hiscore:
|
||||||
$"/root/Global".write_save()
|
$"/root/Global".write_save()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _on_restart_pressed() -> void:
|
func _on_restart_pressed() -> void:
|
||||||
$"../..".start_game()
|
$"../..".start_game()
|
||||||
$AnimationPlayer.play("out-in")
|
$AnimationPlayer.pop_out()
|
||||||
$"../../Audio/Gui-out".play()
|
|
||||||
await $AnimationPlayer.animation_finished
|
|
||||||
hide()
|
|
||||||
|
|
||||||
|
|
||||||
func _on_back_pressed() -> void:
|
func _on_back_pressed() -> void:
|
||||||
|
|
|
@ -5,7 +5,7 @@ var audio_bus_sounds = 2
|
||||||
var sound_button_on_of = {true:preload("res://assets/GUI/sound button.png"),false:preload("res://assets/GUI/sound button off.png")}
|
var sound_button_on_of = {true:preload("res://assets/GUI/sound button.png"),false:preload("res://assets/GUI/sound button off.png")}
|
||||||
var sound_button_on_of_f = {true:preload("res://assets/GUI/buttons fucused/sound button f.png"),false:preload("res://assets/GUI/buttons fucused/sound button off f.png")}
|
var sound_button_on_of_f = {true:preload("res://assets/GUI/buttons fucused/sound button f.png"),false:preload("res://assets/GUI/buttons fucused/sound button off f.png")}
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
#$"../../Audio/Duckrun".volume_db = linear_to_db(20*0.01)
|
#$"../../Audio/Duckrun".volume_db = linear_to_db(20*0.01)
|
||||||
$AnimationPlayer.play_backwards("out-in")
|
$AnimationPlayer.play_backwards("out-in")
|
||||||
|
@ -16,25 +16,18 @@ func _process(_delta: float) -> void:
|
||||||
#$Logo.global_position.x = 0
|
#$Logo.global_position.x = 0
|
||||||
|
|
||||||
func open():
|
func open():
|
||||||
show()
|
$AnimationPlayer.pop_in()
|
||||||
$AnimationPlayer.play_backwards("out-in")
|
|
||||||
$"../../Audio/Gui-in".play()
|
|
||||||
$BackButton.grab_focus()
|
$BackButton.grab_focus()
|
||||||
|
|
||||||
func _on_back_pressed() -> void:
|
func _on_back_pressed() -> void:
|
||||||
$AnimationPlayer.play("out-in")
|
$AnimationPlayer.pop_out()
|
||||||
$"../../Audio/Gui-out".play()
|
|
||||||
await $AnimationPlayer.animation_finished
|
|
||||||
hide()
|
|
||||||
$"../StartSchild"._ready()
|
$"../StartSchild"._ready()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _volume_slider_changed(value: float) -> void:
|
func _volume_slider_changed(value: float) -> void:
|
||||||
AudioServer.set_bus_volume_db(audio_bus_music,linear_to_db(value*0.01))
|
AudioServer.set_bus_volume_db(audio_bus_music,linear_to_db(value*0.01))
|
||||||
|
|
||||||
|
|
||||||
func _on_sound_button_toggled(toggled_on: bool) -> void:
|
func _on_sound_button_toggled(_toggled_on: bool) -> void:
|
||||||
$SoundToggleButton.texture_normal = sound_button_on_of[AudioServer.is_bus_mute(audio_bus_sounds)]
|
$SoundToggleButton.texture_normal = sound_button_on_of[AudioServer.is_bus_mute(audio_bus_sounds)]
|
||||||
$SoundToggleButton.texture_focused = sound_button_on_of_f[AudioServer.is_bus_mute(audio_bus_sounds)]
|
$SoundToggleButton.texture_focused = sound_button_on_of_f[AudioServer.is_bus_mute(audio_bus_sounds)]
|
||||||
AudioServer.set_bus_mute(audio_bus_sounds,not AudioServer.is_bus_mute(audio_bus_sounds))
|
AudioServer.set_bus_mute(audio_bus_sounds,not AudioServer.is_bus_mute(audio_bus_sounds))
|
||||||
|
|
|
@ -1,28 +1,21 @@
|
||||||
extends TextureRect
|
extends TextureRect
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$AnimationPlayer.play_backwards("out-in")
|
$"../StartSchildLogo/AnimationPlayer".pop_in()
|
||||||
$"../../Audio/Gui-in".play()
|
$AnimationPlayer.pop_in()
|
||||||
show()
|
|
||||||
$Start.grab_focus()
|
$Start.grab_focus()
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
$Logo.global_position.x = -5
|
|
||||||
|
|
||||||
|
|
||||||
func _on_start_pressed() -> void:
|
func _on_start_pressed() -> void:
|
||||||
|
$AnimationPlayer.pop_out()
|
||||||
|
$"../StartSchildLogo/AnimationPlayer".pop_out()
|
||||||
$"../..".start_game()
|
$"../..".start_game()
|
||||||
$AnimationPlayer.play("out-in")
|
|
||||||
$"../../Audio/Gui-out".play()
|
|
||||||
await $AnimationPlayer.animation_finished
|
|
||||||
hide()
|
|
||||||
|
|
||||||
|
|
||||||
func _on_settings_pressed() -> void:
|
func _on_settings_pressed() -> void:
|
||||||
$AnimationPlayer.play("out-in")
|
$"../StartSchildLogo/AnimationPlayer".pop_out()
|
||||||
$"../../Audio/Gui-out".play()
|
$AnimationPlayer.pop_out()
|
||||||
await $AnimationPlayer.animation_finished
|
|
||||||
hide()
|
|
||||||
$"../Settings".open()
|
$"../Settings".open()
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"hiscore":0
|
"hiscore":0,
|
||||||
|
"coins":0
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,40 +12,13 @@ var active_biom
|
||||||
var gamerunning = false
|
var gamerunning = false
|
||||||
|
|
||||||
|
|
||||||
var hiscore
|
var hiscore:int
|
||||||
|
var coins:int
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
load_save()
|
var save = load_save()
|
||||||
#write_save()
|
hiscore = save["hiscore"]
|
||||||
func load_save():
|
coins = save["hiscore"]
|
||||||
var data : FileAccess
|
|
||||||
if (not FileAccess.file_exists("user://save.json")) or (FileAccess.open("user://save.json", FileAccess.READ_WRITE).get_as_text() == ""):
|
|
||||||
data = FileAccess.open("user://save.json", FileAccess.WRITE)
|
|
||||||
data.store_string(FileAccess.open("res://code/first_save.json", FileAccess.READ).get_as_text())
|
|
||||||
data.close()
|
|
||||||
data = FileAccess.open("user://save.json", FileAccess.READ)
|
|
||||||
|
|
||||||
var content_text = JSON.parse_string(data.get_as_text())
|
|
||||||
|
|
||||||
if content_text:
|
|
||||||
print("loaded: ",content_text)
|
|
||||||
hiscore = content_text.get("hiscore", 0)
|
|
||||||
else:
|
|
||||||
print("Failed to parse JSON")
|
|
||||||
data.close()
|
|
||||||
|
|
||||||
|
|
||||||
func write_save():
|
|
||||||
var data : FileAccess
|
|
||||||
data = FileAccess.open("user://save.json",FileAccess.WRITE)
|
|
||||||
var content = JSON.stringify(
|
|
||||||
{
|
|
||||||
"hiscore":$/root/Game/Gui/ScoreContainer.get_score()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
print("saved: ",content)
|
|
||||||
data.store_string(content)
|
|
||||||
|
|
||||||
|
|
||||||
func reset_game():
|
func reset_game():
|
||||||
speed = 100
|
speed = 100
|
||||||
|
@ -53,5 +26,39 @@ func reset_game():
|
||||||
active_biom = "n"
|
active_biom = "n"
|
||||||
gamerunning = false
|
gamerunning = false
|
||||||
_ready()
|
_ready()
|
||||||
$/root/Game/Fade/FadeAnimation.play("fade")
|
|
||||||
get_tree().reload_current_scene()
|
get_tree().reload_current_scene()
|
||||||
|
|
||||||
|
|
||||||
|
var data : FileAccess
|
||||||
|
|
||||||
|
func load_save() -> Dictionary:
|
||||||
|
# wenn kein save vorhanden ist, erstelle eins
|
||||||
|
if (not FileAccess.file_exists("user://save.json")) or (FileAccess.open("user://save.json", FileAccess.READ_WRITE).get_as_text() == ""):
|
||||||
|
init_save()
|
||||||
|
|
||||||
|
data = FileAccess.open("user://save.json", FileAccess.READ)
|
||||||
|
var content_text: Dictionary = JSON.parse_string(data.get_as_text())
|
||||||
|
|
||||||
|
if content_text:
|
||||||
|
print("loaded: ",content_text)
|
||||||
|
return content_text
|
||||||
|
else:
|
||||||
|
print("Failed to parse JSON")
|
||||||
|
return {}
|
||||||
|
|
||||||
|
|
||||||
|
func write_save():
|
||||||
|
var sdata : FileAccess
|
||||||
|
sdata = FileAccess.open("user://save.json",FileAccess.WRITE)
|
||||||
|
var content = JSON.stringify(
|
||||||
|
{
|
||||||
|
"hiscore":$/root/Game/Gui/ScoreContainer.get_score()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
print("saved: ",content)
|
||||||
|
sdata.store_string(content)
|
||||||
|
|
||||||
|
func init_save():
|
||||||
|
data = FileAccess.open("user://save.json", FileAccess.WRITE)
|
||||||
|
data.store_string(FileAccess.open("res://code/first_save.json", FileAccess.READ).get_as_text())
|
||||||
|
data.close()
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
extends Label
|
extends Label
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
text = str($"/root/Global".hiscore)
|
text = str($"/root/Global".hiscore)
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
pass
|
|
||||||
|
|
||||||
#func get_score():
|
|
||||||
# return int(text)
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$Fade/FadeAnimation.play_backwards("fade")
|
$Fade/Animation.play_backwards("fade")
|
||||||
$Screen/Background/Floor/EasterEggFixCollision.disabled = false
|
$Screen/Background/Floor/EasterEggFixCollision.disabled = false
|
||||||
$Gui/HiscoreContainer.show()
|
$Gui/HiscoreContainer.show()
|
||||||
%ScoreContainer.hide()
|
%ScoreContainer.hide()
|
||||||
|
|
|
@ -7,7 +7,7 @@ func _ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func get_score():
|
func get_score():
|
||||||
|
|
|
@ -7,6 +7,9 @@ signal gameover
|
||||||
@onready var alive = true
|
@onready var alive = true
|
||||||
var state = "main-menu"
|
var state = "main-menu"
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
%Skin.change_to(0)
|
||||||
|
|
||||||
func die():
|
func die():
|
||||||
print("die")
|
print("die")
|
||||||
gameover.emit()
|
gameover.emit()
|
||||||
|
@ -26,7 +29,7 @@ func _physics_process(delta: float) -> void:
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
if position.x < 20 or position.y > 100:
|
if global_position.x < 20 or global_position.y > 100:
|
||||||
if alive:
|
if alive:
|
||||||
die()
|
die()
|
||||||
|
|
||||||
|
@ -43,11 +46,6 @@ func _process(_delta: float) -> void:
|
||||||
else:
|
else:
|
||||||
$AnimationPlayer.play("walk")
|
$AnimationPlayer.play("walk")
|
||||||
|
|
||||||
func _collide_with_hindernis(_body: Node2D) -> void:
|
|
||||||
pass
|
|
||||||
#if alive:
|
|
||||||
# die()
|
|
||||||
|
|
||||||
|
|
||||||
func _color_slider_changed(value) -> void:
|
func _color_slider_changed(value) -> void:
|
||||||
$EnteConstantSprite/EnteColormask.modulate.h = $"../../Gui/Settings/ColorSlider".value*0.01
|
$EnteConstantSprite/EnteColormask.modulate.h = $"../../Gui/Settings/ColorSlider".value*0.01
|
||||||
|
@ -55,3 +53,4 @@ func _color_slider_changed(value) -> void:
|
||||||
|
|
||||||
func _on_ente_sprite_frame_changed() -> void:
|
func _on_ente_sprite_frame_changed() -> void:
|
||||||
$EnteConstantSprite/EnteColormask.frame = $EnteConstantSprite.frame
|
$EnteConstantSprite/EnteColormask.frame = $EnteConstantSprite.frame
|
||||||
|
$EnteConstantSprite/Skin.frame = $EnteConstantSprite.frame
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
[gd_scene load_steps=12 format=3 uid="uid://8v5mbbnddorh"]
|
[gd_scene load_steps=14 format=3 uid="uid://8v5mbbnddorh"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dc6grg2oaq3a6" path="res://scenes/Duck/ente.png" id="1"]
|
[ext_resource type="Texture2D" uid="uid://dc6grg2oaq3a6" path="res://scenes/Duck/ente.png" id="1"]
|
||||||
[ext_resource type="Script" path="res://scenes/Duck/Duck.gd" id="1_pvotk"]
|
[ext_resource type="Script" path="res://scenes/Duck/Duck.gd" id="1_pvotk"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dsifqpp5l00cr" path="res://scenes/Duck/ente_colormask.png" id="3_a4v8w"]
|
[ext_resource type="Texture2D" uid="uid://dsifqpp5l00cr" path="res://scenes/Duck/ente_colormask.png" id="3_a4v8w"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c1mq2xs0uuoxu" path="res://scenes/Duck/customs/1.png" id="4_acy8u"]
|
||||||
|
[ext_resource type="Script" path="res://scenes/Duck/skin.gd" id="4_gc1nf"]
|
||||||
|
|
||||||
[sub_resource type="Animation" id="5"]
|
[sub_resource type="Animation" id="5"]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
|
@ -113,8 +115,9 @@ libraries = {
|
||||||
|
|
||||||
[node name="EnteConstantSprite" type="Sprite2D" parent="."]
|
[node name="EnteConstantSprite" type="Sprite2D" parent="."]
|
||||||
texture_filter = 3
|
texture_filter = 3
|
||||||
position = Vector2(0, -7)
|
position = Vector2(-8, -16)
|
||||||
texture = ExtResource("1")
|
texture = ExtResource("1")
|
||||||
|
centered = false
|
||||||
hframes = 3
|
hframes = 3
|
||||||
vframes = 2
|
vframes = 2
|
||||||
frame = 4
|
frame = 4
|
||||||
|
@ -122,9 +125,18 @@ frame = 4
|
||||||
[node name="EnteColormask" type="Sprite2D" parent="EnteConstantSprite"]
|
[node name="EnteColormask" type="Sprite2D" parent="EnteConstantSprite"]
|
||||||
modulate = Color(1, 1, 0, 1)
|
modulate = Color(1, 1, 0, 1)
|
||||||
texture = ExtResource("3_a4v8w")
|
texture = ExtResource("3_a4v8w")
|
||||||
|
centered = false
|
||||||
hframes = 3
|
hframes = 3
|
||||||
vframes = 2
|
vframes = 2
|
||||||
|
|
||||||
|
[node name="Skin" type="Sprite2D" parent="EnteConstantSprite"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
texture = ExtResource("4_acy8u")
|
||||||
|
centered = false
|
||||||
|
hframes = 3
|
||||||
|
vframes = 2
|
||||||
|
script = ExtResource("4_gc1nf")
|
||||||
|
|
||||||
[node name="physicsbox" type="CollisionShape2D" parent="."]
|
[node name="physicsbox" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2(2.38419e-07, -6)
|
position = Vector2(2.38419e-07, -6)
|
||||||
scale = Vector2(5, 5)
|
scale = Vector2(5, 5)
|
||||||
|
|
BIN
scenes/Duck/customs/0.png
Normal file
After Width: | Height: | Size: 484 B |
34
scenes/Duck/customs/0.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://ce0vevqn8ato7"
|
||||||
|
path="res://.godot/imported/0.png-940815318ee3975aa08c57ce3dd29bc8.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://scenes/Duck/customs/0.png"
|
||||||
|
dest_files=["res://.godot/imported/0.png-940815318ee3975aa08c57ce3dd29bc8.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=1
|
||||||
|
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
|
BIN
scenes/Duck/customs/1.png
Normal file
After Width: | Height: | Size: 731 B |
34
scenes/Duck/customs/1.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c1mq2xs0uuoxu"
|
||||||
|
path="res://.godot/imported/1.png-db9f6a2a43cc52b4b34f318375c7f5a7.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://scenes/Duck/customs/1.png"
|
||||||
|
dest_files=["res://.godot/imported/1.png-db9f6a2a43cc52b4b34f318375c7f5a7.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=1
|
||||||
|
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
|
BIN
scenes/Duck/customs/2.png
Normal file
After Width: | Height: | Size: 591 B |
34
scenes/Duck/customs/2.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cgs3hrxrrslip"
|
||||||
|
path="res://.godot/imported/2.png-e7ef44db5e8ec5954a8c29fb6584d647.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://scenes/Duck/customs/2.png"
|
||||||
|
dest_files=["res://.godot/imported/2.png-e7ef44db5e8ec5954a8c29fb6584d647.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
|
BIN
scenes/Duck/customs/3.png
Normal file
After Width: | Height: | Size: 630 B |
34
scenes/Duck/customs/3.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bs7mitmimjd4d"
|
||||||
|
path="res://.godot/imported/3.png-c65c606fbe3fd8bad5ef424c13f9ca84.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://scenes/Duck/customs/3.png"
|
||||||
|
dest_files=["res://.godot/imported/3.png-c65c606fbe3fd8bad5ef424c13f9ca84.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
|
BIN
scenes/Duck/customs/skin-vorlage.aseprite
Normal file
5
scenes/Duck/skin.gd
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
extends Sprite2D
|
||||||
|
|
||||||
|
|
||||||
|
func change_to(custom_number:int):
|
||||||
|
texture = load("res://scenes/Duck/customs/{s}.png".format({"s":str(custom_number)}))
|
381
scenes/Main.tscn
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=49 format=3 uid="uid://bb5qp5868y5i"]
|
[gd_scene load_steps=51 format=3 uid="uid://bb5qp5868y5i"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://code/main.gd" id="1_ar2ah"]
|
[ext_resource type="Script" path="res://code/main.gd" id="1_ar2ah"]
|
||||||
[ext_resource type="PackedScene" uid="uid://8v5mbbnddorh" path="res://scenes/Duck/Duck.tscn" id="2"]
|
[ext_resource type="PackedScene" uid="uid://8v5mbbnddorh" path="res://scenes/Duck/Duck.tscn" id="2"]
|
||||||
|
@ -11,8 +11,8 @@
|
||||||
[ext_resource type="Script" path="res://scenes/Wolke/Spawner/wolken_spawner.gd" id="11_x2wm3"]
|
[ext_resource type="Script" path="res://scenes/Wolke/Spawner/wolken_spawner.gd" id="11_x2wm3"]
|
||||||
[ext_resource type="Script" path="res://scenes/easteregg/Spawner/easteregg_spawner.gd" id="12_hl8it"]
|
[ext_resource type="Script" path="res://scenes/easteregg/Spawner/easteregg_spawner.gd" id="12_hl8it"]
|
||||||
[ext_resource type="FontFile" uid="uid://ddvhypxkj8a1b" path="res://Megamichisfont-small.otf" id="13_666gv"]
|
[ext_resource type="FontFile" uid="uid://ddvhypxkj8a1b" path="res://Megamichisfont-small.otf" id="13_666gv"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cfmflpkl335e3" path="res://assets/GUI/schild.png" id="13_yjq5c"]
|
||||||
[ext_resource type="Script" path="res://code/hiscore.gd" id="14_ah063"]
|
[ext_resource type="Script" path="res://code/hiscore.gd" id="14_ah063"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dm307sj4nenjt" path="res://scenes/schild.tscn" id="15_1xp2x"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://fon35dtl2fdd" path="res://assets/GUI/buttons fucused/back button f.png" id="15_2rflk"]
|
[ext_resource type="Texture2D" uid="uid://fon35dtl2fdd" path="res://assets/GUI/buttons fucused/back button f.png" id="15_2rflk"]
|
||||||
[ext_resource type="Script" path="res://code/GUI/settingsschild.gd" id="16_4ssry"]
|
[ext_resource type="Script" path="res://code/GUI/settingsschild.gd" id="16_4ssry"]
|
||||||
[ext_resource type="Texture2D" uid="uid://nvn254p6tk8j" path="res://assets/GUI/back button.png" id="17_3kek5"]
|
[ext_resource type="Texture2D" uid="uid://nvn254p6tk8j" path="res://assets/GUI/back button.png" id="17_3kek5"]
|
||||||
|
@ -27,233 +27,76 @@
|
||||||
[ext_resource type="AudioStream" uid="uid://ctt1kb2a66yyl" path="res://assets/audio/boing.mp3" id="21_ch5yv"]
|
[ext_resource type="AudioStream" uid="uid://ctt1kb2a66yyl" path="res://assets/audio/boing.mp3" id="21_ch5yv"]
|
||||||
[ext_resource type="AudioStream" uid="uid://bktthpfrs0118" path="res://assets/audio/gui-out.ogg" id="21_frskh"]
|
[ext_resource type="AudioStream" uid="uid://bktthpfrs0118" path="res://assets/audio/gui-out.ogg" id="21_frskh"]
|
||||||
[ext_resource type="Script" path="res://code/GUI/startschild.gd" id="21_owbcl"]
|
[ext_resource type="Script" path="res://code/GUI/startschild.gd" id="21_owbcl"]
|
||||||
|
[ext_resource type="Script" path="res://code/GUI/restartschild.gd" id="21_ytgei"]
|
||||||
[ext_resource type="AudioStream" uid="uid://c4wrtvywao1jn" path="res://assets/audio/duckrun.wav" id="22_ijpe0"]
|
[ext_resource type="AudioStream" uid="uid://c4wrtvywao1jn" path="res://assets/audio/duckrun.wav" id="22_ijpe0"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d2i2d0rmdtklc" path="res://assets/GUI/start button.png" id="22_x686b"]
|
[ext_resource type="Texture2D" uid="uid://d2i2d0rmdtklc" path="res://assets/GUI/start button.png" id="22_x686b"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dqvnnd3o1eele" path="res://assets/GUI/settings button.png" id="23_on2gf"]
|
[ext_resource type="Texture2D" uid="uid://dqvnnd3o1eele" path="res://assets/GUI/settings button.png" id="23_on2gf"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bj7bgtdcbdald" path="res://assets/GUI/logo.png" id="24_8b8my"]
|
[ext_resource type="Texture2D" uid="uid://bj7bgtdcbdald" path="res://assets/GUI/logo.png" id="24_8b8my"]
|
||||||
[ext_resource type="Script" path="res://code/score.gd" id="25_2prek"]
|
[ext_resource type="Script" path="res://code/score.gd" id="25_2prek"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c66oktmsmdu0f" path="res://assets/GUI/buttons fucused/settings button f.png" id="25_bjwbg"]
|
[ext_resource type="Texture2D" uid="uid://c66oktmsmdu0f" path="res://assets/GUI/buttons fucused/settings button f.png" id="25_bjwbg"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dm307sj4nenjt" path="res://scenes/ui/animation.tscn" id="30_30gpa"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://yiu5npbi008a" path="res://scenes/ui/animation_logo.tscn" id="31_ugbfy"]
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_28fei"]
|
[sub_resource type="GDScript" id="GDScript_xq7jv"]
|
||||||
|
script/source = "extends ColorRect
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
visible = true
|
||||||
|
"
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_0cnuw"]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
tracks/0/path = NodePath(".:color")
|
tracks/0/path = NodePath(".:modulate")
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 0.0001),
|
|
||||||
"transitions": PackedFloat32Array(1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(1, 1, 1, 1), Color(0, 0, 0, 1)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_yef6t"]
|
|
||||||
resource_name = "fade"
|
|
||||||
length = 0.1
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath(".:color")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 0.1),
|
|
||||||
"transitions": PackedFloat32Array(1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(1, 1, 1, 1), Color(0, 0, 0, 1)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_s1fwp"]
|
|
||||||
_data = {
|
|
||||||
"RESET": SubResource("Animation_28fei"),
|
|
||||||
"fade": SubResource("Animation_yef6t")
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_4fx6d"]
|
|
||||||
resource_name = "Fade"
|
|
||||||
length = 0.45
|
|
||||||
step = 0.1
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("..:modulate")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 0.4),
|
|
||||||
"transitions": PackedFloat32Array(1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(1, 1, 1, 1), Color(0, 0, 0, 1)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_j0xom"]
|
|
||||||
length = 0.001
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("..:modulate")
|
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
"times": PackedFloat32Array(0),
|
"times": PackedFloat32Array(0),
|
||||||
"transitions": PackedFloat32Array(1),
|
"transitions": PackedFloat32Array(1),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [Color(1, 1, 1, 1)]
|
"values": [Color(1, 1, 1, 0)]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_otim5"]
|
[sub_resource type="Animation" id="Animation_tt0ob"]
|
||||||
resource_name = "change_time"
|
resource_name = "fade"
|
||||||
length = 3.0
|
length = 0.3
|
||||||
step = 0.1
|
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
tracks/0/path = NodePath(".:color")
|
tracks/0/path = NodePath(".:modulate")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
"times": PackedFloat32Array(0, 2.8),
|
"times": PackedFloat32Array(0, 0.3),
|
||||||
"transitions": PackedFloat32Array(1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(0.162512, 0.669077, 0.79808, 1), Color(0.0375358, 0.131849, 0.373243, 1)]
|
|
||||||
}
|
|
||||||
tracks/1/type = "value"
|
|
||||||
tracks/1/imported = false
|
|
||||||
tracks/1/enabled = true
|
|
||||||
tracks/1/path = NodePath("..:modulate")
|
|
||||||
tracks/1/interp = 1
|
|
||||||
tracks/1/loop_wrap = true
|
|
||||||
tracks/1/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 3),
|
|
||||||
"transitions": PackedFloat32Array(1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(1, 1, 1, 1), Color(0.493545, 0.493546, 0.493546, 1)]
|
|
||||||
}
|
|
||||||
tracks/2/type = "value"
|
|
||||||
tracks/2/imported = false
|
|
||||||
tracks/2/enabled = true
|
|
||||||
tracks/2/path = NodePath("../Background/Stars:modulate")
|
|
||||||
tracks/2/interp = 1
|
|
||||||
tracks/2/loop_wrap = true
|
|
||||||
tracks/2/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 3),
|
|
||||||
"transitions": PackedFloat32Array(1, 1),
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_7cwe6"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qrakk"]
|
||||||
resource_name = "change_timeold"
|
|
||||||
length = 6.0
|
|
||||||
step = 0.25
|
|
||||||
tracks/0/type = "bezier"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("..:modulate:r")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"handle_modes": PackedInt32Array(0, 0),
|
|
||||||
"points": PackedFloat32Array(1, -0.5, 0, 1, 0, 0.6, -1, 0, 0.5, 0),
|
|
||||||
"times": PackedFloat32Array(0, 6)
|
|
||||||
}
|
|
||||||
tracks/1/type = "bezier"
|
|
||||||
tracks/1/imported = false
|
|
||||||
tracks/1/enabled = true
|
|
||||||
tracks/1/path = NodePath("..:modulate:g")
|
|
||||||
tracks/1/interp = 1
|
|
||||||
tracks/1/loop_wrap = true
|
|
||||||
tracks/1/keys = {
|
|
||||||
"handle_modes": PackedInt32Array(0, 0),
|
|
||||||
"points": PackedFloat32Array(1, -0.5, 0, 1, 0, 0.6, -1, 0, 0.5, 0),
|
|
||||||
"times": PackedFloat32Array(0, 6)
|
|
||||||
}
|
|
||||||
tracks/2/type = "bezier"
|
|
||||||
tracks/2/imported = false
|
|
||||||
tracks/2/enabled = true
|
|
||||||
tracks/2/path = NodePath("..:modulate:b")
|
|
||||||
tracks/2/interp = 1
|
|
||||||
tracks/2/loop_wrap = true
|
|
||||||
tracks/2/keys = {
|
|
||||||
"handle_modes": PackedInt32Array(0, 0),
|
|
||||||
"points": PackedFloat32Array(1, -0.5, 0, 1, 0, 0.6, -1, 0, 0.5, 0),
|
|
||||||
"times": PackedFloat32Array(0, 6)
|
|
||||||
}
|
|
||||||
tracks/3/type = "bezier"
|
|
||||||
tracks/3/imported = false
|
|
||||||
tracks/3/enabled = true
|
|
||||||
tracks/3/path = NodePath(".:color:r")
|
|
||||||
tracks/3/interp = 1
|
|
||||||
tracks/3/loop_wrap = true
|
|
||||||
tracks/3/keys = {
|
|
||||||
"handle_modes": PackedInt32Array(0, 0),
|
|
||||||
"points": PackedFloat32Array(0.560784, -0.25, 0, 0.25, 0, 0.1, -0.5, 0, 0.25, 0),
|
|
||||||
"times": PackedFloat32Array(0, 6)
|
|
||||||
}
|
|
||||||
tracks/4/type = "bezier"
|
|
||||||
tracks/4/imported = false
|
|
||||||
tracks/4/enabled = true
|
|
||||||
tracks/4/path = NodePath(".:color:g")
|
|
||||||
tracks/4/interp = 1
|
|
||||||
tracks/4/loop_wrap = true
|
|
||||||
tracks/4/keys = {
|
|
||||||
"handle_modes": PackedInt32Array(0, 0),
|
|
||||||
"points": PackedFloat32Array(0.937255, -0.25, 0, 0.25, 0, 0.1, -0.5, 0, 0.25, 0),
|
|
||||||
"times": PackedFloat32Array(0, 6)
|
|
||||||
}
|
|
||||||
tracks/5/type = "bezier"
|
|
||||||
tracks/5/imported = false
|
|
||||||
tracks/5/enabled = true
|
|
||||||
tracks/5/path = NodePath(".:color:b")
|
|
||||||
tracks/5/interp = 1
|
|
||||||
tracks/5/loop_wrap = true
|
|
||||||
tracks/5/keys = {
|
|
||||||
"handle_modes": PackedInt32Array(0, 0),
|
|
||||||
"points": PackedFloat32Array(0.937255, -0.25, 0, 0.25, 0, 0.3, -0.25, 0, 0.25, 0),
|
|
||||||
"times": PackedFloat32Array(0, 6)
|
|
||||||
}
|
|
||||||
tracks/6/type = "bezier"
|
|
||||||
tracks/6/imported = false
|
|
||||||
tracks/6/enabled = true
|
|
||||||
tracks/6/path = NodePath("../Background/Stars:modulate:a")
|
|
||||||
tracks/6/interp = 1
|
|
||||||
tracks/6/loop_wrap = true
|
|
||||||
tracks/6/keys = {
|
|
||||||
"handle_modes": PackedInt32Array(0, 0),
|
|
||||||
"points": PackedFloat32Array(0, -0.25, 0, 1, 0, 1, -1, 0, 0.25, 0),
|
|
||||||
"times": PackedFloat32Array(0, 6)
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_c30x0"]
|
|
||||||
_data = {
|
_data = {
|
||||||
"Fade": SubResource("Animation_4fx6d"),
|
"RESET": SubResource("Animation_0cnuw"),
|
||||||
"RESET": SubResource("Animation_j0xom"),
|
"fade": SubResource("Animation_tt0ob")
|
||||||
"change_time": SubResource("Animation_otim5"),
|
|
||||||
"change_timeold": SubResource("Animation_7cwe6")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="GDScript" id="GDScript_rkc4w"]
|
[sub_resource type="GDScript" id="GDScript_rkc4w"]
|
||||||
script/source = "extends Timer
|
script/source = "extends Timer
|
||||||
|
|
||||||
var day = true
|
var day = true
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready() -> void:
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
func _change_time() -> void:
|
func _change_time() -> void:
|
||||||
if day:
|
if day:
|
||||||
$\"../AnimationPlayer\".play(\"change_time\")
|
$\"../AnimationPlayer\".play(\"change_time\")
|
||||||
|
print(\"playing\")
|
||||||
day = not day
|
day = not day
|
||||||
else:
|
else:
|
||||||
$\"../AnimationPlayer\".play_backwards(\"change_time\")
|
$\"../AnimationPlayer\".play_backwards(\"change_time\")
|
||||||
|
print(\"playing r\")
|
||||||
day = not day
|
day = not day
|
||||||
|
|
||||||
"
|
"
|
||||||
|
@ -264,6 +107,78 @@ size = Vector2(2, 9.75)
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0a3yj"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0a3yj"]
|
||||||
size = Vector2(356.5, 8)
|
size = Vector2(356.5, 8)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_plyvn"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("../Fade:modulate")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 0)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("BackgroundColor:color")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0.160784, 0.670588, 0.8, 1)]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath(".: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)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_8pa57"]
|
||||||
|
resource_name = "change_time"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("BackgroundColor: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.160784, 0.670588, 0.8, 1), Color(0.086, 0.0917334, 0.43, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath(".:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 1), Color(0.470075, 0.470076, 0.470076, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_t75gq"]
|
||||||
|
_data = {
|
||||||
|
"RESET": SubResource("Animation_plyvn"),
|
||||||
|
"change_time": SubResource("Animation_8pa57")
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_jin1w"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_jin1w"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_g0rdc"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_g0rdc"]
|
||||||
|
@ -290,32 +205,35 @@ HSlider/styles/slider = SubResource("StyleBoxFlat_xb3tf")
|
||||||
[node name="Game" type="Node"]
|
[node name="Game" type="Node"]
|
||||||
script = ExtResource("1_ar2ah")
|
script = ExtResource("1_ar2ah")
|
||||||
|
|
||||||
[node name="Fade" type="CanvasModulate" parent="."]
|
[node name="Fade" type="ColorRect" parent="."]
|
||||||
|
modulate = Color(1, 1, 1, 0)
|
||||||
|
z_index = 1
|
||||||
|
z_as_relative = false
|
||||||
|
offset_top = -9.0
|
||||||
|
offset_right = 485.0
|
||||||
|
offset_bottom = 300.0
|
||||||
|
mouse_filter = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
script = SubResource("GDScript_xq7jv")
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
[node name="FadeAnimation" type="AnimationPlayer" parent="Fade"]
|
[node name="Animation" type="AnimationPlayer" parent="Fade"]
|
||||||
unique_name_in_owner = true
|
|
||||||
libraries = {
|
libraries = {
|
||||||
"": SubResource("AnimationLibrary_s1fwp")
|
"": SubResource("AnimationLibrary_qrakk")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Screen" type="Node2D" parent="."]
|
[node name="Screen" type="Node2D" parent="."]
|
||||||
script = ExtResource("2_cix0i")
|
script = ExtResource("2_cix0i")
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="Screen"]
|
[node name="BackgroundColor" type="ColorRect" parent="Screen"]
|
||||||
offset_left = -10.0
|
offset_left = -10.0
|
||||||
offset_top = -9.0
|
offset_top = -9.0
|
||||||
offset_right = 561.0
|
offset_right = 561.0
|
||||||
offset_bottom = 111.0
|
offset_bottom = 111.0
|
||||||
color = Color(0.160784, 0.670588, 0.8, 1)
|
color = Color(0.160784, 0.670588, 0.8, 1)
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Screen"]
|
|
||||||
root_node = NodePath("")
|
|
||||||
libraries = {
|
|
||||||
"": SubResource("AnimationLibrary_c30x0")
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Day-NightTimer" type="Timer" parent="Screen"]
|
[node name="Day-NightTimer" type="Timer" parent="Screen"]
|
||||||
wait_time = 12.0
|
wait_time = 15.0
|
||||||
autostart = true
|
autostart = true
|
||||||
script = SubResource("GDScript_rkc4w")
|
script = SubResource("GDScript_rkc4w")
|
||||||
|
|
||||||
|
@ -351,10 +269,10 @@ position = Vector2(178.25, 96)
|
||||||
shape = SubResource("RectangleShape2D_0a3yj")
|
shape = SubResource("RectangleShape2D_0a3yj")
|
||||||
|
|
||||||
[node name="Duck" parent="Screen" instance=ExtResource("2")]
|
[node name="Duck" parent="Screen" instance=ExtResource("2")]
|
||||||
position = Vector2(21, 91)
|
position = Vector2(25, 52)
|
||||||
|
|
||||||
[node name="CoinSpawner" type="Marker2D" parent="Screen"]
|
[node name="CoinSpawner" type="Marker2D" parent="Screen"]
|
||||||
position = Vector2(485, 83)
|
position = Vector2(485, 80)
|
||||||
script = ExtResource("8_7ggb5")
|
script = ExtResource("8_7ggb5")
|
||||||
|
|
||||||
[node name="HurdleSpawner" type="Marker2D" parent="Screen"]
|
[node name="HurdleSpawner" type="Marker2D" parent="Screen"]
|
||||||
|
@ -371,6 +289,13 @@ wait_time = 1.6
|
||||||
[node name="CoinSpawnTimer" type="Timer" parent="Screen"]
|
[node name="CoinSpawnTimer" type="Timer" parent="Screen"]
|
||||||
wait_time = 1.6
|
wait_time = 1.6
|
||||||
|
|
||||||
|
[node name="partices" type="Node2D" parent="Screen"]
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="Screen"]
|
||||||
|
libraries = {
|
||||||
|
"": SubResource("AnimationLibrary_t75gq")
|
||||||
|
}
|
||||||
|
|
||||||
[node name="Gui" type="Control" parent="."]
|
[node name="Gui" type="Control" parent="."]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
|
@ -405,14 +330,12 @@ theme_override_font_sizes/font_size = 8
|
||||||
text = "0"
|
text = "0"
|
||||||
script = ExtResource("14_ah063")
|
script = ExtResource("14_ah063")
|
||||||
|
|
||||||
[node name="Settings" parent="Gui" instance=ExtResource("15_1xp2x")]
|
[node name="Settings" type="TextureRect" parent="Gui"]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 1
|
anchors_preset = 1
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_top = 0.0
|
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 0.0
|
|
||||||
offset_left = -102.0
|
offset_left = -102.0
|
||||||
offset_top = -68.0
|
offset_top = -68.0
|
||||||
offset_right = -2.0
|
offset_right = -2.0
|
||||||
|
@ -420,6 +343,7 @@ offset_bottom = 82.0
|
||||||
grow_horizontal = 0
|
grow_horizontal = 0
|
||||||
size_flags_horizontal = 8
|
size_flags_horizontal = 8
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
|
texture = ExtResource("13_yjq5c")
|
||||||
stretch_mode = 2
|
stretch_mode = 2
|
||||||
script = ExtResource("16_4ssry")
|
script = ExtResource("16_4ssry")
|
||||||
|
|
||||||
|
@ -508,7 +432,9 @@ toggle_mode = true
|
||||||
texture_normal = ExtResource("19_vwek8")
|
texture_normal = ExtResource("19_vwek8")
|
||||||
texture_focused = ExtResource("18_ahbxs")
|
texture_focused = ExtResource("18_ahbxs")
|
||||||
|
|
||||||
[node name="GameOverSchild" parent="Gui" instance=ExtResource("15_1xp2x")]
|
[node name="AnimationPlayer" parent="Gui/Settings" instance=ExtResource("30_30gpa")]
|
||||||
|
|
||||||
|
[node name="GameOverSchild" type="TextureRect" parent="Gui"]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
|
@ -522,9 +448,11 @@ offset_right = 49.0
|
||||||
offset_bottom = 34.0
|
offset_bottom = 34.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
|
texture = ExtResource("13_yjq5c")
|
||||||
stretch_mode = 2
|
stretch_mode = 2
|
||||||
metadata/_edit_lock_ = true
|
script = ExtResource("21_ytgei")
|
||||||
|
|
||||||
[node name="Restart" type="TextureButton" parent="Gui/GameOverSchild"]
|
[node name="Restart" type="TextureButton" parent="Gui/GameOverSchild"]
|
||||||
texture_repeat = 2
|
texture_repeat = 2
|
||||||
|
@ -559,20 +487,23 @@ offset_bottom = -18.3
|
||||||
texture_normal = ExtResource("17_3kek5")
|
texture_normal = ExtResource("17_3kek5")
|
||||||
texture_focused = ExtResource("15_2rflk")
|
texture_focused = ExtResource("15_2rflk")
|
||||||
|
|
||||||
[node name="StartSchild" parent="Gui" instance=ExtResource("15_1xp2x")]
|
[node name="AnimationPlayer" parent="Gui/GameOverSchild" instance=ExtResource("30_30gpa")]
|
||||||
|
|
||||||
|
[node name="StartSchild" type="TextureRect" parent="Gui"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 6
|
anchors_preset = 6
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -101.0
|
offset_left = -100.0
|
||||||
offset_top = -114.0
|
offset_top = -117.0
|
||||||
offset_right = -1.0
|
offset_bottom = 33.0
|
||||||
offset_bottom = 36.0
|
|
||||||
grow_horizontal = 0
|
grow_horizontal = 0
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
|
texture = ExtResource("13_yjq5c")
|
||||||
stretch_mode = 2
|
stretch_mode = 2
|
||||||
script = ExtResource("21_owbcl")
|
script = ExtResource("21_owbcl")
|
||||||
|
|
||||||
|
@ -612,34 +543,32 @@ offset_bottom = -8.55
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
scale = Vector2(3, 3)
|
scale = Vector2(3, 3)
|
||||||
focus_neighbor_left = NodePath("../Logo")
|
focus_neighbor_left = NodePath("../../StartSchildLogo")
|
||||||
focus_neighbor_right = NodePath("../Start")
|
focus_neighbor_right = NodePath("../Start")
|
||||||
focus_next = NodePath("../Start")
|
focus_next = NodePath("../Start")
|
||||||
focus_previous = NodePath("../Logo")
|
focus_previous = NodePath("../../StartSchildLogo")
|
||||||
texture_normal = ExtResource("23_on2gf")
|
texture_normal = ExtResource("23_on2gf")
|
||||||
texture_focused = ExtResource("25_bjwbg")
|
texture_focused = ExtResource("25_bjwbg")
|
||||||
stretch_mode = 1
|
stretch_mode = 1
|
||||||
|
|
||||||
[node name="Logo" type="TextureButton" parent="Gui/StartSchild"]
|
[node name="AnimationPlayer" parent="Gui/StartSchild" instance=ExtResource("30_30gpa")]
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 3
|
[node name="StartSchildLogo" type="TextureButton" parent="Gui"]
|
||||||
anchor_left = 1.0
|
layout_direction = 1
|
||||||
anchor_top = 1.0
|
layout_mode = 0
|
||||||
anchor_right = 1.0
|
offset_left = -7.0
|
||||||
anchor_bottom = 1.0
|
offset_top = 44.0
|
||||||
offset_left = -177.0
|
offset_right = 121.0
|
||||||
offset_top = -38.0
|
offset_bottom = 73.0
|
||||||
offset_right = -49.0
|
|
||||||
offset_bottom = -9.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
rotation = -0.413643
|
rotation = -0.413643
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
focus_neighbor_right = NodePath("../Settings")
|
focus_neighbor_right = NodePath("../StartSchild/Settings")
|
||||||
focus_next = NodePath("../Settings")
|
focus_next = NodePath("../StartSchild/Settings")
|
||||||
texture_normal = ExtResource("24_8b8my")
|
texture_normal = ExtResource("24_8b8my")
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" parent="Gui/StartSchildLogo" instance=ExtResource("31_ugbfy")]
|
||||||
|
|
||||||
[node name="ScoreContainer" type="HBoxContainer" parent="Gui"]
|
[node name="ScoreContainer" type="HBoxContainer" parent="Gui"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
@ -704,5 +633,5 @@ bus = &"Background"
|
||||||
[connection signal="pressed" from="Gui/GameOverSchild/back" to="Gui/GameOverSchild" method="_on_back_pressed"]
|
[connection signal="pressed" from="Gui/GameOverSchild/back" to="Gui/GameOverSchild" method="_on_back_pressed"]
|
||||||
[connection signal="pressed" from="Gui/StartSchild/Start" to="Gui/StartSchild" method="_on_start_pressed"]
|
[connection signal="pressed" from="Gui/StartSchild/Start" to="Gui/StartSchild" method="_on_start_pressed"]
|
||||||
[connection signal="pressed" from="Gui/StartSchild/Settings" to="Gui/StartSchild" method="_on_settings_pressed"]
|
[connection signal="pressed" from="Gui/StartSchild/Settings" to="Gui/StartSchild" method="_on_settings_pressed"]
|
||||||
[connection signal="pressed" from="Gui/StartSchild/Logo" to="Gui/EastereggSpawner" method="_spawn"]
|
[connection signal="pressed" from="Gui/StartSchildLogo" to="Gui/EastereggSpawner" method="_spawn"]
|
||||||
[connection signal="timeout" from="Gui/ScoreContainer/score/ScoreCounter" to="." method="_score"]
|
[connection signal="timeout" from="Gui/ScoreContainer/score/ScoreCounter" to="." method="_score"]
|
||||||
|
|
|
@ -12,5 +12,3 @@ func _ready() -> void:
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
global_position.x -= speed * delta
|
global_position.x -= speed * delta
|
||||||
if global_position.x < -30:
|
|
||||||
queue_free()
|
|
||||||
|
|
|
@ -8,3 +8,7 @@ texture_filter = 1
|
||||||
texture = ExtResource("1_c6lhp")
|
texture = ExtResource("1_c6lhp")
|
||||||
hframes = 5
|
hframes = 5
|
||||||
script = ExtResource("2_tsh5n")
|
script = ExtResource("2_tsh5n")
|
||||||
|
|
||||||
|
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||||
|
|
||||||
|
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="queue_free"]
|
||||||
|
|
|
@ -12,9 +12,11 @@ func _physics_process(delta: float) -> void:
|
||||||
|
|
||||||
func _on_body_entered(body: Node2D) -> void:
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
if body.name == "Duck":
|
if body.name == "Duck":
|
||||||
|
#print("duck touched")
|
||||||
$AnimationPlayer.play("explode")
|
$AnimationPlayer.play("explode")
|
||||||
await $AnimationPlayer.animation_finished
|
#await await $AnimationPlayer.animation_finished
|
||||||
queue_free()
|
##queue_free()
|
||||||
|
#print("animation finisched")
|
||||||
# add coin
|
# add coin
|
||||||
if body.name == "hurdle":
|
if body.name == "hurdle":
|
||||||
queue_free()
|
pass#queue_free()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=8 format=3 uid="uid://b0au341yw6g52"]
|
[gd_scene load_steps=13 format=3 uid="uid://b0au341yw6g52"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dtn6mbn4q0plm" path="res://scenes/coin/coin.png" id="1_4vkkb"]
|
[ext_resource type="Texture2D" uid="uid://dtn6mbn4q0plm" path="res://scenes/coin/coin.png" id="1_4vkkb"]
|
||||||
[ext_resource type="Script" path="res://scenes/coin/coin.gd" id="1_xp82m"]
|
[ext_resource type="Script" path="res://scenes/coin/coin.gd" id="1_xp82m"]
|
||||||
|
@ -29,6 +29,71 @@ tracks/1/keys = {
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [Color(1, 1, 1, 1)]
|
"values": [Color(1, 1, 1, 1)]
|
||||||
}
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = false
|
||||||
|
tracks/2/path = NodePath("GPUParticles2D:emitting")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [false]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/path = NodePath("Sprite:position")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_6xqsk"]
|
||||||
|
resource_name = "explode"
|
||||||
|
length = 0.2
|
||||||
|
step = 0.01
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("Sprite:modulate")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0.01, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("GPUParticles2D:emitting")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [true]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("Sprite:position")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.2),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, 0), Vector2(0, -12)]
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_64j7p"]
|
[sub_resource type="Animation" id="Animation_64j7p"]
|
||||||
resource_name = "rotate"
|
resource_name = "rotate"
|
||||||
|
@ -46,23 +111,6 @@ tracks/0/keys = {
|
||||||
"values": [0, 1, 2, 1]
|
"values": [0, 1, 2, 1]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_6xqsk"]
|
|
||||||
resource_name = "explode"
|
|
||||||
length = 0.1
|
|
||||||
step = 0.01
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("Sprite:modulate")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 0.09),
|
|
||||||
"transitions": PackedFloat32Array(1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_om3ic"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_om3ic"]
|
||||||
_data = {
|
_data = {
|
||||||
"RESET": SubResource("Animation_jfpvc"),
|
"RESET": SubResource("Animation_jfpvc"),
|
||||||
|
@ -73,7 +121,32 @@ _data = {
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_qamc5"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_qamc5"]
|
||||||
radius = 3.0
|
radius = 3.0
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_b4fpo"]
|
||||||
|
offsets = PackedFloat32Array(0, 0.321839, 1)
|
||||||
|
colors = PackedColorArray(1, 0.921828, 0.423545, 1, 0.98436, 0.850996, 0, 1, 0.79237, 0.68246, 0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_sasf4"]
|
||||||
|
gradient = SubResource("Gradient_b4fpo")
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_01enh"]
|
||||||
|
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), -2.83732, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_1vf08"]
|
||||||
|
curve = SubResource("Curve_01enh")
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_bv68t"]
|
||||||
|
particle_flag_disable_z = true
|
||||||
|
spread = 180.0
|
||||||
|
initial_velocity_min = 15.0
|
||||||
|
initial_velocity_max = 30.0
|
||||||
|
gravity = Vector3(0, 0, 0)
|
||||||
|
scale_max = 3.0
|
||||||
|
scale_curve = SubResource("CurveTexture_1vf08")
|
||||||
|
color_initial_ramp = SubResource("GradientTexture1D_sasf4")
|
||||||
|
|
||||||
[node name="Coin" type="Area2D"]
|
[node name="Coin" type="Area2D"]
|
||||||
|
position = Vector2(3, 3)
|
||||||
script = ExtResource("1_xp82m")
|
script = ExtResource("1_xp82m")
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite2D" parent="."]
|
[node name="Sprite" type="Sprite2D" parent="."]
|
||||||
|
@ -90,4 +163,12 @@ libraries = {
|
||||||
visible = false
|
visible = false
|
||||||
shape = SubResource("CircleShape2D_qamc5")
|
shape = SubResource("CircleShape2D_qamc5")
|
||||||
|
|
||||||
|
[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
emitting = false
|
||||||
|
amount = 9
|
||||||
|
process_material = SubResource("ParticleProcessMaterial_bv68t")
|
||||||
|
lifetime = 0.5
|
||||||
|
explosiveness = 1.0
|
||||||
|
|
||||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
|
|
|
@ -13,7 +13,7 @@ func _spawn() -> void:
|
||||||
|
|
||||||
var v1 = 1.5 - (speed / 200)#260
|
var v1 = 1.5 - (speed / 200)#260
|
||||||
var v2 = 2.0 - (speed / 200)
|
var v2 = 2.0 - (speed / 200)
|
||||||
coin.global_position.y -= randi_range(0,2)*16
|
coin.global_position.y -= randi_range(0,2)*14
|
||||||
$"../CoinSpawnTimer".wait_time = randf_range(v1,v2)
|
$"../CoinSpawnTimer".wait_time = randf_range(v1,v2)
|
||||||
add_child(coin)
|
add_child(coin)
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
extends RigidBody2D
|
extends RigidBody2D
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$Sprite.frame = randi_range(0,12)
|
$Sprite.frame = randi_range(0,12)
|
||||||
position.x += randi_range(-10,10)
|
position.x += randi_range(-10,10)
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
if global_position.y > 100:
|
|
||||||
queue_free()
|
|
||||||
|
|
|
@ -10,14 +10,20 @@ radius = 8.06226
|
||||||
script = ExtResource("1_3dnpr")
|
script = ExtResource("1_3dnpr")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2(0, -7)
|
position = Vector2(8, 9)
|
||||||
shape = SubResource("CircleShape2D_ruej1")
|
shape = SubResource("CircleShape2D_ruej1")
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite2D" parent="."]
|
[node name="Sprite" type="Sprite2D" parent="."]
|
||||||
texture_filter = 1
|
texture_filter = 1
|
||||||
position = Vector2(0, -7)
|
|
||||||
texture = ExtResource("1_al4up")
|
texture = ExtResource("1_al4up")
|
||||||
offset = Vector2(0, 0.5)
|
centered = false
|
||||||
hframes = 5
|
hframes = 5
|
||||||
vframes = 3
|
vframes = 3
|
||||||
frame = 3
|
frame = 1
|
||||||
|
|
||||||
|
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||||
|
position = Vector2(1, 1)
|
||||||
|
rect = Rect2(0, 0, 14, 14)
|
||||||
|
|
||||||
|
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="queue_free"]
|
||||||
|
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_screen_exited"]
|
||||||
|
|
|
@ -7,11 +7,10 @@ var speed: float
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
if $"/root/Global".gamerunning:
|
if $"/root/Global".gamerunning:
|
||||||
|
print("ahhhh")
|
||||||
global_position.x -= $"/root/Global".speed*delta
|
global_position.x -= $"/root/Global".speed*delta
|
||||||
if global_position.y < -30:
|
|
||||||
queue_free()
|
|
||||||
|
|
||||||
|
|
||||||
func screen_e() -> void:
|
func screen_e() -> void:
|
||||||
|
|
|
@ -21,6 +21,15 @@ func probability(prozent):
|
||||||
return randf() > 1 - (0.01 * prozent)
|
return randf() > 1 - (0.01 * prozent)
|
||||||
|
|
||||||
func change_biom():
|
func change_biom():
|
||||||
|
#if active_biom == "w_n":
|
||||||
|
# active_biom = "n"
|
||||||
|
#elif active_biom == "s_n":
|
||||||
|
# active_biom = "n"
|
||||||
|
#elif active_biom == "n_w":
|
||||||
|
# active_biom = "w"
|
||||||
|
#elif active_biom == "n_s":
|
||||||
|
# active_biom = "s"
|
||||||
|
|
||||||
if biom_type == "n":
|
if biom_type == "n":
|
||||||
change_in -= 1
|
change_in -= 1
|
||||||
if probability(60):
|
if probability(60):
|
||||||
|
|
|
@ -15,5 +15,3 @@ func _ready() -> void:
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
speed = $"/root/Global".speed
|
speed = $"/root/Global".speed
|
||||||
global_position.x -= speed*delta
|
global_position.x -= speed*delta
|
||||||
if global_position.x < -30:
|
|
||||||
queue_free()
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
radius = 5.0
|
radius = 5.0
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_r1tmj"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_r1tmj"]
|
||||||
radius = 5.0
|
radius = 6.0
|
||||||
|
|
||||||
[node name="hurdle" type="CharacterBody2D"]
|
[node name="hurdle" type="CharacterBody2D"]
|
||||||
collision_layer = 3
|
collision_layer = 3
|
||||||
|
@ -16,17 +16,17 @@ script = ExtResource("1_e0hqe")
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite2D" parent="."]
|
[node name="Sprite" type="Sprite2D" parent="."]
|
||||||
texture_filter = 1
|
texture_filter = 1
|
||||||
position = Vector2(0, -8)
|
position = Vector2(-8, -15)
|
||||||
texture = ExtResource("2_thg8w")
|
texture = ExtResource("2_thg8w")
|
||||||
offset = Vector2(0, 0.5)
|
centered = false
|
||||||
hframes = 5
|
hframes = 5
|
||||||
vframes = 3
|
vframes = 3
|
||||||
frame = 14
|
frame = 8
|
||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2(0, 0, 80, 48)
|
region_rect = Rect2(0, 0, 80, 48)
|
||||||
|
|
||||||
[node name="collision" type="CollisionShape2D" parent="."]
|
[node name="collision" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2(0, -7)
|
position = Vector2(0, -5)
|
||||||
shape = SubResource("CircleShape2D_orpyb")
|
shape = SubResource("CircleShape2D_orpyb")
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="."]
|
[node name="Area2D" type="Area2D" parent="."]
|
||||||
|
@ -35,5 +35,12 @@ collision_layer = 3
|
||||||
collision_mask = 3
|
collision_mask = 3
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||||
|
position = Vector2(0, 1)
|
||||||
shape = SubResource("CircleShape2D_r1tmj")
|
shape = SubResource("CircleShape2D_r1tmj")
|
||||||
debug_color = Color(0.906661, 0.254677, 0.42413, 0.42)
|
debug_color = Color(0.906661, 0.254677, 0.42413, 0.42)
|
||||||
|
|
||||||
|
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||||
|
position = Vector2(3, -4)
|
||||||
|
rect = Rect2(-10, -10, 14, 14)
|
||||||
|
|
||||||
|
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="queue_free"]
|
||||||
|
|
12
scenes/ui/animation.gd
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
extends AnimationPlayer
|
||||||
|
|
||||||
|
func pop_in():
|
||||||
|
play_backwards("out-in")
|
||||||
|
$"../../../Audio/Gui-in".play()
|
||||||
|
get_parent().show()
|
||||||
|
|
||||||
|
func pop_out():
|
||||||
|
play("out-in")
|
||||||
|
$"../../../Audio/Gui-out".play()
|
||||||
|
await animation_finished
|
||||||
|
get_parent().hide()
|
|
@ -1,7 +1,6 @@
|
||||||
[gd_scene load_steps=6 format=3 uid="uid://dm307sj4nenjt"]
|
[gd_scene load_steps=5 format=3 uid="uid://dm307sj4nenjt"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cfmflpkl335e3" path="res://assets/GUI/schild.png" id="1_wyhk0"]
|
[ext_resource type="Script" path="res://scenes/ui/animation.gd" id="1_43757"]
|
||||||
[ext_resource type="Script" path="res://code/GUI/restartschild.gd" id="2_pxsow"]
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_hmob6"]
|
[sub_resource type="Animation" id="Animation_hmob6"]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
|
@ -17,7 +16,7 @@ tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
"handle_modes": PackedInt32Array(0, 0, 0),
|
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||||
"points": PackedFloat32Array(-67, -0.25, 0, 0.0666667, 0.981804, -56.456, -0.1, -0.683014, 0.0666667, 1.36603, -250, -0.133333, -1.11485, 0.15, 0),
|
"points": PackedFloat32Array(-67, -0.25, 0, 0.0666667, 0.981804, -56, -0.1, -0.683014, 0.0666667, 1.36603, -250, -0.133333, -1.11485, 0.15, 0),
|
||||||
"times": PackedFloat32Array(0, 0.133333, 0.5)
|
"times": PackedFloat32Array(0, 0.133333, 0.5)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,21 +26,8 @@ _data = {
|
||||||
"out-in": SubResource("Animation_wgvxk")
|
"out-in": SubResource("Animation_wgvxk")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Schild" type="TextureRect"]
|
[node name="AnimationPlayer" type="AnimationPlayer"]
|
||||||
anchors_preset = -1
|
|
||||||
anchor_left = -0.259
|
|
||||||
anchor_top = 0.14
|
|
||||||
anchor_right = 0.282
|
|
||||||
anchor_bottom = 0.79
|
|
||||||
offset_left = -3.97
|
|
||||||
offset_top = -81.0
|
|
||||||
offset_right = 4.06
|
|
||||||
offset_bottom = 4.0
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
texture = ExtResource("1_wyhk0")
|
|
||||||
script = ExtResource("2_pxsow")
|
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
||||||
libraries = {
|
libraries = {
|
||||||
"": SubResource("AnimationLibrary_ur3ij")
|
"": SubResource("AnimationLibrary_ur3ij")
|
||||||
}
|
}
|
||||||
|
script = ExtResource("1_43757")
|
15
scenes/ui/animation_logo.tscn
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://yiu5npbi008a"]
|
||||||
|
|
||||||
|
[ext_resource type="Animation" uid="uid://dvpvbkqok645q" path="res://scenes/ui/out-in.res" id="1_mcm38"]
|
||||||
|
[ext_resource type="Script" path="res://scenes/ui/animation.gd" id="1_urjt6"]
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_u5u2i"]
|
||||||
|
_data = {
|
||||||
|
"out-in": ExtResource("1_mcm38")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer"]
|
||||||
|
libraries = {
|
||||||
|
"": SubResource("AnimationLibrary_u5u2i")
|
||||||
|
}
|
||||||
|
script = ExtResource("1_urjt6")
|