- Fixing Commit
This commit is contained in:
parent
d92086f600
commit
78b4a3bba2
14 changed files with 133 additions and 66 deletions
Binary file not shown.
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 8.3 KiB |
|
@ -29,3 +29,5 @@ func _on_restart_pressed() -> void:
|
|||
hide()
|
||||
|
||||
|
||||
func _on_back_pressed() -> void:
|
||||
$"/root/Global".reset_game()
|
||||
|
|
|
@ -45,3 +45,13 @@ func write_save():
|
|||
)
|
||||
print("saved: ",content)
|
||||
data.store_string(content)
|
||||
|
||||
|
||||
func reset_game():
|
||||
speed = 100
|
||||
score = 0
|
||||
active_biom = "n"
|
||||
gamerunning = false
|
||||
_ready()
|
||||
$/root/Game/Fade/FadeAnimation.play("fade")
|
||||
get_tree().reload_current_scene()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
extends Node
|
||||
|
||||
func _ready() -> void:
|
||||
$Fade/FadeAnimation.play_backwards("fade")
|
||||
$Screen/Background/Floor/EasterEggFixCollision.disabled = false
|
||||
$Gui/HiscoreContainer.show()
|
||||
%ScoreContainer.hide()
|
||||
|
@ -18,6 +19,7 @@ func start_game():
|
|||
$"/root/Global".start.emit()
|
||||
$"/root/Global".score = 0
|
||||
$"/root/Global".speed = 100
|
||||
print("game started")
|
||||
|
||||
func _on_level_up_timer_timeout() -> void:
|
||||
if $"/root/Global".speed < $"/root/Global".maxspeed:
|
||||
|
@ -30,7 +32,3 @@ func _score() -> void:
|
|||
elif $Screen/Duck.alive:
|
||||
$"/root/Global".score += 10
|
||||
%ScoreContainer/score.text = str($"/root/Global".score)
|
||||
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ custom_features=""
|
|||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="builds/DuckRun_v2.2.0iconfix.apk"
|
||||
export_path="builds/DuckRun_v2.3.0.apk"
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
encrypt_pck=false
|
||||
|
@ -31,7 +31,7 @@ architectures/armeabi-v7a=true
|
|||
architectures/arm64-v8a=true
|
||||
architectures/x86=false
|
||||
architectures/x86_64=false
|
||||
version/code=9
|
||||
version/code=10
|
||||
version/name=""
|
||||
package/unique_name="at.megamichi.duckrun"
|
||||
package/name="DuckRun"
|
||||
|
@ -226,7 +226,7 @@ custom_features=""
|
|||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="builds/DuckRun_v2.2.0.zip"
|
||||
export_path="builds/DuckRun_v2.3.0.zip"
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
encrypt_pck=false
|
||||
|
|
|
@ -11,7 +11,7 @@ config_version=5
|
|||
[application]
|
||||
|
||||
config/name="DuckRun"
|
||||
config/version="2.2.0"
|
||||
config/version="2.3.0"
|
||||
run/main_scene="res://scenes/Main.tscn"
|
||||
config/features=PackedStringArray("4.3")
|
||||
boot_splash/image="res://icon.png"
|
||||
|
|
146
scenes/Main.tscn
146
scenes/Main.tscn
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=39 format=3 uid="uid://bb5qp5868y5i"]
|
||||
[gd_scene load_steps=41 format=3 uid="uid://bb5qp5868y5i"]
|
||||
|
||||
[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"]
|
||||
|
@ -6,26 +6,62 @@
|
|||
[ext_resource type="Script" path="res://scenes/ground/spawner/ground_spawner.gd" id="3_va7mo"]
|
||||
[ext_resource type="Script" path="res://scenes/hindernis/Spawner/hindernis_spawner.gd" id="4_oc6me"]
|
||||
[ext_resource type="PackedScene" uid="uid://cjq8kb0mhjh8r" path="res://scenes/ground/ground.tscn" id="4_tt0te"]
|
||||
[ext_resource type="PackedScene" uid="uid://dm307sj4nenjt" path="res://scenes/schild.tscn" id="5_ewtcf"]
|
||||
[ext_resource type="Texture2D" uid="uid://do0okfxenx2ci" path="res://assets/GUI/restart button.png" id="6_boo0r"]
|
||||
[ext_resource type="Script" path="res://scenes/easteregg/Spawner/easteregg_spawner.gd" id="8_awkaj"]
|
||||
[ext_resource type="Script" path="res://code/GUI/gui.gd" id="8_t3tw7"]
|
||||
[ext_resource type="Script" path="res://code/GUI/startschild.gd" id="10_tn1on"]
|
||||
[ext_resource type="Texture2D" uid="uid://d2i2d0rmdtklc" path="res://assets/GUI/start button.png" id="11_4sha5"]
|
||||
[ext_resource type="Script" path="res://scenes/Wolke/Spawner/wolken_spawner.gd" id="11_x2wm3"]
|
||||
[ext_resource type="Texture2D" uid="uid://dqvnnd3o1eele" path="res://assets/GUI/settings button.png" id="13_0b7u8"]
|
||||
[ext_resource type="Texture2D" uid="uid://46wo0ufacs5d" path="res://assets/GUI/sound button.png" id="13_hvt5m"]
|
||||
[ext_resource type="Texture2D" uid="uid://bj7bgtdcbdald" path="res://assets/GUI/logo.png" id="14_4hepj"]
|
||||
[ext_resource type="Texture2D" uid="uid://nvn254p6tk8j" path="res://assets/GUI/back button.png" id="15_wi7xd"]
|
||||
[ext_resource type="Script" path="res://code/GUI/settingsschild.gd" id="16_0wi25"]
|
||||
[ext_resource type="Texture2D" uid="uid://bf82voofmvdj4" path="res://assets/GUI/theme_slider/slider.png" id="17_41xdg"]
|
||||
[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="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="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://bf82voofmvdj4" path="res://assets/GUI/theme_slider/slider.png" id="18_u2no7"]
|
||||
[ext_resource type="Texture2D" uid="uid://46wo0ufacs5d" path="res://assets/GUI/sound button.png" id="19_vwek8"]
|
||||
[ext_resource type="AudioStream" uid="uid://drriw1cka4m3" path="res://assets/audio/gui-in.ogg" id="20_eihxi"]
|
||||
[ext_resource type="Script" path="res://code/hiscore.gd" id="21_5nnhv"]
|
||||
[ext_resource type="Texture2D" uid="uid://do0okfxenx2ci" path="res://assets/GUI/restart button.png" id="20_gdgit"]
|
||||
[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="FontFile" uid="uid://ddvhypxkj8a1b" path="res://Megamichisfont-small.otf" id="21_uy1pc"]
|
||||
[ext_resource type="Script" path="res://code/GUI/startschild.gd" id="21_owbcl"]
|
||||
[ext_resource type="AudioStream" uid="uid://c4wrtvywao1jn" path="res://assets/audio/duckrun.wav" id="22_ijpe0"]
|
||||
[ext_resource type="Script" path="res://code/score.gd" id="22_m4aei"]
|
||||
[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://bj7bgtdcbdald" path="res://assets/GUI/logo.png" id="24_8b8my"]
|
||||
[ext_resource type="Script" path="res://code/score.gd" id="25_2prek"]
|
||||
|
||||
[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="Animation" id="Animation_28fei"]
|
||||
length = 0.001
|
||||
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.0001),
|
||||
"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"
|
||||
|
@ -236,9 +272,9 @@ expand_margin_top = 1.0
|
|||
expand_margin_bottom = 2.0
|
||||
anti_aliasing = false
|
||||
|
||||
[sub_resource type="Theme" id="Theme_0130c"]
|
||||
HSlider/icons/grabber = ExtResource("17_41xdg")
|
||||
HSlider/icons/grabber_highlight = ExtResource("17_41xdg")
|
||||
[sub_resource type="Theme" id="Theme_fcgbk"]
|
||||
HSlider/icons/grabber = ExtResource("18_u2no7")
|
||||
HSlider/icons/grabber_highlight = ExtResource("18_u2no7")
|
||||
HSlider/styles/grabber_area = SubResource("StyleBoxEmpty_jin1w")
|
||||
HSlider/styles/grabber_area_highlight = SubResource("StyleBoxEmpty_g0rdc")
|
||||
HSlider/styles/slider = SubResource("StyleBoxFlat_xb3tf")
|
||||
|
@ -246,6 +282,14 @@ HSlider/styles/slider = SubResource("StyleBoxFlat_xb3tf")
|
|||
[node name="Game" type="Node"]
|
||||
script = ExtResource("1_ar2ah")
|
||||
|
||||
[node name="Fade" type="CanvasModulate" parent="."]
|
||||
|
||||
[node name="FadeAnimation" type="AnimationPlayer" parent="Fade"]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_s1fwp")
|
||||
}
|
||||
|
||||
[node name="Screen" type="Node2D" parent="."]
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Screen"]
|
||||
|
@ -315,15 +359,14 @@ anchor_right = 1.0
|
|||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("8_t3tw7")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="EastereggSpawner" type="Marker2D" parent="Gui"]
|
||||
position = Vector2(81, -18)
|
||||
script = ExtResource("8_awkaj")
|
||||
script = ExtResource("12_hl8it")
|
||||
|
||||
[node name="HiscoreContainer" type="VBoxContainer" parent="Gui"]
|
||||
layout_mode = 1
|
||||
layout_mode = 0
|
||||
offset_left = 1.0
|
||||
offset_top = 1.0
|
||||
offset_right = 66.0
|
||||
|
@ -332,18 +375,18 @@ theme_override_constants/separation = 0
|
|||
|
||||
[node name="hiscore_text" type="Label" parent="Gui/HiscoreContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = ExtResource("21_uy1pc")
|
||||
theme_override_fonts/font = ExtResource("13_666gv")
|
||||
theme_override_font_sizes/font_size = 8
|
||||
text = "Your Highscore:"
|
||||
|
||||
[node name="hiscore" type="Label" parent="Gui/HiscoreContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = ExtResource("21_uy1pc")
|
||||
theme_override_fonts/font = ExtResource("13_666gv")
|
||||
theme_override_font_sizes/font_size = 8
|
||||
text = "0"
|
||||
script = ExtResource("21_5nnhv")
|
||||
script = ExtResource("14_ah063")
|
||||
|
||||
[node name="Settings" parent="Gui" instance=ExtResource("5_ewtcf")]
|
||||
[node name="Settings" parent="Gui" instance=ExtResource("15_1xp2x")]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
|
@ -359,7 +402,7 @@ grow_horizontal = 0
|
|||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 4
|
||||
stretch_mode = 2
|
||||
script = ExtResource("16_0wi25")
|
||||
script = ExtResource("16_4ssry")
|
||||
|
||||
[node name="BackButton" type="TextureButton" parent="Gui/Settings"]
|
||||
layout_mode = 1
|
||||
|
@ -367,7 +410,7 @@ offset_left = 2.0
|
|||
offset_top = 79.0
|
||||
offset_right = 17.0
|
||||
offset_bottom = 94.0
|
||||
texture_normal = ExtResource("15_wi7xd")
|
||||
texture_normal = ExtResource("17_3kek5")
|
||||
|
||||
[node name="ColorLabel" type="Label" parent="Gui/Settings"]
|
||||
layout_mode = 0
|
||||
|
@ -375,7 +418,7 @@ offset_left = 5.0
|
|||
offset_top = 98.0
|
||||
offset_right = 62.0
|
||||
offset_bottom = 115.0
|
||||
theme_override_fonts/font = ExtResource("21_uy1pc")
|
||||
theme_override_fonts/font = ExtResource("13_666gv")
|
||||
theme_override_font_sizes/font_size = 8
|
||||
text = "Color"
|
||||
|
||||
|
@ -385,7 +428,7 @@ offset_left = 5.0
|
|||
offset_top = 127.0
|
||||
offset_right = 45.0
|
||||
offset_bottom = 150.0
|
||||
theme_override_fonts/font = ExtResource("21_uy1pc")
|
||||
theme_override_fonts/font = ExtResource("13_666gv")
|
||||
theme_override_font_sizes/font_size = 8
|
||||
text = "Music:"
|
||||
|
||||
|
@ -398,7 +441,7 @@ offset_left = 32.0
|
|||
offset_top = 93.0
|
||||
offset_right = 26.1
|
||||
offset_bottom = 34.0
|
||||
theme = SubResource("Theme_0130c")
|
||||
theme = SubResource("Theme_fcgbk")
|
||||
value = 17.0
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
|
@ -412,7 +455,7 @@ offset_left = 5.0
|
|||
offset_top = 131.0
|
||||
offset_right = 12.1
|
||||
offset_bottom = 72.0
|
||||
theme = SubResource("Theme_0130c")
|
||||
theme = SubResource("Theme_fcgbk")
|
||||
value = 20.0
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
|
@ -431,10 +474,9 @@ offset_bottom = 2.0
|
|||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
toggle_mode = true
|
||||
texture_normal = ExtResource("13_hvt5m")
|
||||
texture_normal = ExtResource("19_vwek8")
|
||||
|
||||
[node name="GameOverSchild" parent="Gui" instance=ExtResource("5_ewtcf")]
|
||||
visible = false
|
||||
[node name="GameOverSchild" parent="Gui" instance=ExtResource("15_1xp2x")]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
|
@ -463,10 +505,24 @@ offset_top = -23.3
|
|||
offset_right = -8.0
|
||||
offset_bottom = -8.3
|
||||
scale = Vector2(3, 3)
|
||||
texture_normal = ExtResource("6_boo0r")
|
||||
texture_normal = ExtResource("20_gdgit")
|
||||
stretch_mode = 1
|
||||
|
||||
[node name="StartSchild" parent="Gui" instance=ExtResource("5_ewtcf")]
|
||||
[node name="back" type="TextureButton" parent="Gui/GameOverSchild"]
|
||||
texture_repeat = 2
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.762
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.762
|
||||
offset_left = -48.0
|
||||
offset_top = -35.3
|
||||
offset_right = -33.0
|
||||
offset_bottom = -20.3
|
||||
texture_normal = ExtResource("17_3kek5")
|
||||
|
||||
[node name="StartSchild" parent="Gui" instance=ExtResource("15_1xp2x")]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
|
@ -482,7 +538,7 @@ grow_horizontal = 0
|
|||
grow_vertical = 2
|
||||
size_flags_vertical = 4
|
||||
stretch_mode = 2
|
||||
script = ExtResource("10_tn1on")
|
||||
script = ExtResource("21_owbcl")
|
||||
|
||||
[node name="Start" type="TextureButton" parent="Gui/StartSchild"]
|
||||
texture_repeat = 2
|
||||
|
@ -499,7 +555,7 @@ offset_bottom = -8.55
|
|||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(3, 3)
|
||||
texture_normal = ExtResource("11_4sha5")
|
||||
texture_normal = ExtResource("22_x686b")
|
||||
stretch_mode = 1
|
||||
|
||||
[node name="Settings" type="TextureButton" parent="Gui/StartSchild"]
|
||||
|
@ -517,7 +573,7 @@ offset_bottom = -8.55
|
|||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(3, 3)
|
||||
texture_normal = ExtResource("13_0b7u8")
|
||||
texture_normal = ExtResource("23_on2gf")
|
||||
stretch_mode = 1
|
||||
|
||||
[node name="Logo" type="TextureButton" parent="Gui/StartSchild"]
|
||||
|
@ -536,7 +592,7 @@ grow_vertical = 0
|
|||
rotation = -0.413643
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
texture_normal = ExtResource("14_4hepj")
|
||||
texture_normal = ExtResource("24_8b8my")
|
||||
|
||||
[node name="ScoreContainer" type="HBoxContainer" parent="Gui"]
|
||||
unique_name_in_owner = true
|
||||
|
@ -549,17 +605,17 @@ offset_top = 17.0
|
|||
offset_right = 29.0
|
||||
offset_bottom = 24.0
|
||||
grow_horizontal = 2
|
||||
script = ExtResource("22_m4aei")
|
||||
script = ExtResource("25_2prek")
|
||||
|
||||
[node name="text" type="Label" parent="Gui/ScoreContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = ExtResource("21_uy1pc")
|
||||
theme_override_fonts/font = ExtResource("13_666gv")
|
||||
theme_override_font_sizes/font_size = 8
|
||||
text = "Score:"
|
||||
|
||||
[node name="score" type="Label" parent="Gui/ScoreContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = ExtResource("21_uy1pc")
|
||||
theme_override_fonts/font = ExtResource("13_666gv")
|
||||
theme_override_font_sizes/font_size = 8
|
||||
text = " "
|
||||
|
||||
|
@ -589,7 +645,6 @@ bus = &"Background"
|
|||
[connection signal="timeout" from="Screen/Day-NightTimer" to="Screen/Day-NightTimer" method="_change_time"]
|
||||
[connection signal="timeout" from="Screen/Background/WolkenSpawner/WolkenTimer" to="Screen/Background/WolkenSpawner" method="_spawn"]
|
||||
[connection signal="screen_entered" from="Screen/Background/GroundSpawner/Ground" to="Screen/Background/GroundSpawner" method="_on_ground_sprite_screen_entered"]
|
||||
[connection signal="gameover" from="Screen/Duck" to="Gui/HiscoreContainer/hiscore" method="set_new_hiscore"]
|
||||
[connection signal="gameover" from="Screen/Duck" to="Gui/GameOverSchild" method="_on_duck_gameover"]
|
||||
[connection signal="timeout" from="Screen/LevelUpTimer" to="." method="_on_level_up_timer_timeout"]
|
||||
[connection signal="timeout" from="Screen/SpawnTimer" to="Screen/HindernissSpawner" method="_spawn"]
|
||||
|
@ -598,6 +653,7 @@ bus = &"Background"
|
|||
[connection signal="value_changed" from="Gui/Settings/VolumeSlider" to="Gui/Settings" method="_volume_slider_changed"]
|
||||
[connection signal="toggled" from="Gui/Settings/SoundToggleButton" to="Gui/Settings" method="_on_sound_button_toggled"]
|
||||
[connection signal="pressed" from="Gui/GameOverSchild/Restart" to="Gui/GameOverSchild" method="_on_restart_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/Settings" to="Gui/StartSchild" method="_on_settings_pressed"]
|
||||
[connection signal="pressed" from="Gui/StartSchild/Logo" to="Gui/EastereggSpawner" method="_spawn"]
|
||||
|
|
|
@ -3,7 +3,7 @@ extends RigidBody2D
|
|||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
$Sprite.frame = randi_range(0,4)
|
||||
$Sprite.frame = randi_range(0,12)
|
||||
position.x += randi_range(-10,10)
|
||||
|
||||
|
||||
|
|
|
@ -19,4 +19,5 @@ position = Vector2(0, -7)
|
|||
texture = ExtResource("1_al4up")
|
||||
offset = Vector2(0, 0.5)
|
||||
hframes = 5
|
||||
vframes = 3
|
||||
frame = 3
|
||||
|
|
|
@ -16,7 +16,6 @@ func _spawn() -> void:
|
|||
#print(str(v1)," ",str(v2))
|
||||
|
||||
$"../SpawnTimer".wait_time = randf_range(v1,v2)
|
||||
#print("speed: ",speed)
|
||||
add_child(hindernis)
|
||||
|
||||
func del_all():
|
||||
|
|
|
@ -4,12 +4,13 @@ extends CharacterBody2D
|
|||
|
||||
|
||||
func _ready() -> void:
|
||||
$"Sprite".frame_coords.x = randi_range(0,4)
|
||||
if $"/root/Global".active_biom == "w":
|
||||
$"Sprite".frame = randi_range(5,9)
|
||||
if $"/root/Global".active_biom == "s":
|
||||
$"Sprite".frame = randi_range(10,12)
|
||||
$"Sprite".frame_coords.y = 1
|
||||
elif $"/root/Global".active_biom == "s":
|
||||
$"Sprite".frame_coords.y = 2
|
||||
else:
|
||||
$"Sprite".frame = randi_range(0,4)
|
||||
$"Sprite".frame_coords.y = 0
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
speed = $"/root/Global".speed
|
||||
|
|
|
@ -21,7 +21,7 @@ texture = ExtResource("2_thg8w")
|
|||
offset = Vector2(0, 0.5)
|
||||
hframes = 5
|
||||
vframes = 3
|
||||
frame = 9
|
||||
frame = 14
|
||||
region_enabled = true
|
||||
region_rect = Rect2(0, 0, 80, 48)
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -8,7 +8,7 @@ length = 0.001
|
|||
|
||||
[sub_resource type="Animation" id="Animation_wgvxk"]
|
||||
resource_name = "out-in"
|
||||
length = 0.3
|
||||
length = 0.5
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
|
@ -16,9 +16,9 @@ tracks/0/path = NodePath(".:position:y")
|
|||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0),
|
||||
"points": PackedFloat32Array(-67, -0.25, 0, 0.2, -2.53268, -250.023, -0.1, 2.25394, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 0.3)
|
||||
"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),
|
||||
"times": PackedFloat32Array(0, 0.133333, 0.5)
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ur3ij"]
|
||||
|
|
Loading…
Reference in a new issue