From 9dadc9b4866e9912687d4ee25ebb51e0366a1130 Mon Sep 17 00:00:00 2001 From: megamichi Date: Thu, 3 Oct 2024 21:12:20 +0200 Subject: [PATCH] =?UTF-8?q?Settings=20Men=C3=BC=20und=20Color=20slider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/GUI/back button.png | Bin 0 -> 4732 bytes assets/GUI/back button.png.import | 34 +++++ assets/GUI/settings button.png | Bin 0 -> 4960 bytes assets/GUI/settings button.png.import | 34 +++++ assets/GUI/theme_slider/slider.png | Bin 0 -> 4943 bytes assets/GUI/theme_slider/slider.png.import | 34 +++++ code/GUI/restartschild.gd | 14 +- code/GUI/settingsschild.gd | 21 +++ code/GUI/startschild.gd | 15 +- export_presets.cfg | 2 +- icon.png | Bin 5246 -> 5788 bytes scenes/Duck/Duck.gd | 29 +++- scenes/Duck/Duck.tscn | 22 ++- scenes/Duck/ente_colormask.png | Bin 0 -> 4705 bytes scenes/Duck/ente_colormask.png.import | 34 +++++ scenes/Main.tscn | 160 ++++++++++++++++++---- scenes/schild.tscn | 85 +++--------- 17 files changed, 370 insertions(+), 114 deletions(-) create mode 100644 assets/GUI/back button.png create mode 100644 assets/GUI/back button.png.import create mode 100644 assets/GUI/settings button.png create mode 100644 assets/GUI/settings button.png.import create mode 100644 assets/GUI/theme_slider/slider.png create mode 100644 assets/GUI/theme_slider/slider.png.import create mode 100644 code/GUI/settingsschild.gd create mode 100644 scenes/Duck/ente_colormask.png create mode 100644 scenes/Duck/ente_colormask.png.import diff --git a/assets/GUI/back button.png b/assets/GUI/back button.png new file mode 100644 index 0000000000000000000000000000000000000000..8972a1f9cbfaa45fdbbe6ad28c919e98a79ef6aa GIT binary patch literal 4732 zcmeHKeNYtV8DB(@T>QYAPaBic~WrI693rCI*Ov#z{3*gN+1hnKU(%C`~hJqNsiMj?W}B9opKz zxSPG*ectE!z0dP|f6uGjwxx2!hOT<(ZM=b;q zG#CoVN|}VJRY3`rqKb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717ZFx8jpls6b2lN1awmp)gdUhDqQC$`l*X zmW7AKKw^QWQwR{V!&>;9kOb5~$Q=ljS@l{>Bo_!$3ysK{0S&Rc69)DmCvd?gI$uZo%C9koI#kKe^_%am9vp=hircp$_} z2!l#VjO7Wj;zL3S@E1$)=`keNVY~7pQUD@HnK+!mSdOGIn&4#2E5cinqDa|nqC}R8 zt7!y19FWxr2uWGRkVnWBlxK`9bWv=f7LU&*QX*-q013lzGemV0CZ5K5h8rTxc;ibX zWr7fKnZryJ;4m7;p*mSyz&Mc*NZAB9nB4fJ|Em%iH;MBU!;{SauS9}l2onJd zSn|XFvJv>oJIjfA;Ola-_x?N^a$Wnr_|DE|Xt^nvzdDQ{H_y?I1Z2zBJD_oz>Tuep zoz*4I=5Cq?9GdA-hb_y!=;)4P59->{>4~o1`j%~$E9L#0dx{2U6K}YDrJZ}eLy){8 zd8wu7)T7CnNn7jwbm_6{pVv$+2yXmlPe<#OOKX1L-BI)L+?{nFOu6vOh4qP#)GkhU eZl-&WRU=!zTiA5`;ff1zCd6Scu)UsLRQE4QC5D~= literal 0 HcmV?d00001 diff --git a/assets/GUI/back button.png.import b/assets/GUI/back button.png.import new file mode 100644 index 0000000..ad6c900 --- /dev/null +++ b/assets/GUI/back button.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://nvn254p6tk8j" +path="res://.godot/imported/back button.png-60c5e1569912a9f358510f65653b65f0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/GUI/back button.png" +dest_files=["res://.godot/imported/back button.png-60c5e1569912a9f358510f65653b65f0.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 diff --git a/assets/GUI/settings button.png b/assets/GUI/settings button.png new file mode 100644 index 0000000000000000000000000000000000000000..6a15011d72487da28118f94266724e4677dc5dbc GIT binary patch literal 4960 zcmeHLeNYtV8DBtwU{GT)BMGhBBebIK?dRR@EgXt>Ag3M@I3s8bzPBI87Vd-FJveA> z9f(adQAvzRhA~7F(TWL9)#+%|Xe357iT%(qZPS_z+G-;eofvCks(ttF_)0U=p{etkg)T))0_TDXho{68@97)D? z$n`$YlOG~kaTRO+)=EFPbzZx?`qkH*#nU!??cz)IcFx^+d~~%xZ&cm zHD3SH*Sqa6-~Sq^-bf5*#QAJQ;jg#NT>PFyT_ZcN3m>$BYx{0;jB`?3;yoNhFJ#EXJUrt^UBKBV&*UCJc zZCuw>{r21Ik99OZy{B`0XA^oeuBZ2tt(Od0xAE+~PksK$zNvjztXIy(%{lZwvvWpb z)tlaJlWNHg%O)r6N%n6cGZt5T*7nt^Et}rj{eGx5vuOE!^IOn4`IEDr2buGB7Oz>A z_K)K^H=kT~*lt|)SQZhSxj8;{_vNHJ%^&||$rn2ucy?OSo0Syd% z`23iwvl13JzE`;;Vb3dDKU}ipLh_}L5{;cpTX!ctb_KC5{6)>l&I{YKFMM|7R{Dyv z2c{ex+f@Cy|AQ5q@(|_I=?w`P8S%o{laKdZz0!8$+->XW-oB*fjlnlA9e=j~K_>n{ zf$}PMF5m^f*9b(vTQY{d0jN6!$(fx`w=5v_*BCMV$x*rY0@ zs4*y&H5R*s#%jSL8fN9Ct@`5MqIRNtD)Rkg4+B+ z31y6ok-!SVN*!g$OF?skqRf}t3u6%Q&T6RAv;dFe_4W0}dfMm@dT`QWvET%SQxpb0 zFtx#_fiUJ%Gj)h4hFwyHpc2p&zYo#O> z1n%|XLuaU3K^+8%1@w(GR2S@0yi`*Cp`aiY)JZ-qb0~x;49pLNf;EwJL;;s-BrkMT z;i}}YCFeSvB?B{b3OtH85SazZ9_Fbj@*r8mV$(+==?o17P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$dg;n8m-UI2-z6inUdhPYeB;+R!zMm=U)EH_!W7_Kc5q8 z>(0)9G-J=F&vtc>Q|G#M!)3wk0ANeH7Ks- zo<*Xp2d$E#`++qP3`5l+h+}RdEXiwtf%-v>7II>J2fHv-Q=Hf`&O>^_#h_LzYlwi# zhQ&U)VU288u(@+Aj)VvSg20f_L@*GFiU}u{#1-Ma*-c<*(!^Nf#Fl%!Xt5pvC~IY{ zBwmuxVl+0#f;u9KDpt4_q#qCZ= zz(dg)CPWIu1)_393mcjqLQPD`uh$t)41?q7KzzZl$1?~Yil$kBd=LpKOi)&m2nLCv z9#Nwt20_vReWgd#2Wyn508zazB7>3`2pKbmLMZZ}f4D9ZNT#F61PFj2G>yVpsbN!= zx;@@O50io#Ef`LEL9&Ng8k%~CtYNX4Bgu4z1_Ip&afewC<}n-C~8O{8JJKI+^Rtw zRkEw3Knu7c+c=zM7!H?s!G@DGEAy&P10Mzsx9QMF+QY1riNd|zRkSLhBNHRW}6e(6@xF3?V zNDi^r6-}-GZ`NkIYo-Zq3kKU$k{~F{td38LMapjWh7H7+_PAlAGgyojne`J_bi|S zCSB!UU#O`Rzf{@jRdf*M;Wkj34&pzGH)Sy7G=u_A^}$mX9@@m_QMyLNz=(`T)%Aa)%W~(rAB5n~^*DU0Cwms|hyMs< z_{&RO$ZhyWp6M$4KJ3X3mpv3kkeo^8XAH8ftpIjr8g5TX=4H#+Z%>%vS@-%!u&cuD zD)P-db$$yqVcztt;%Xu!)SrKP)tuEzXU_VoC+4kh5o}xD7+)qHXg>BrM}NW9f-k6< zjY1RGe&)xY{1KVe{&Pnlry2j^R?pd&uVo)R8C#e)pXZo~R7Q6P$|4Gxo E0g|V!#Q*>R literal 0 HcmV?d00001 diff --git a/assets/GUI/theme_slider/slider.png.import b/assets/GUI/theme_slider/slider.png.import new file mode 100644 index 0000000..a94f877 --- /dev/null +++ b/assets/GUI/theme_slider/slider.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bf82voofmvdj4" +path="res://.godot/imported/slider.png-77782bbc585b1cc04d83aca1b1d1b243.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/GUI/theme_slider/slider.png" +dest_files=["res://.godot/imported/slider.png-77782bbc585b1cc04d83aca1b1d1b243.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 diff --git a/code/GUI/restartschild.gd b/code/GUI/restartschild.gd index b7abd6b..ab4f945 100644 --- a/code/GUI/restartschild.gd +++ b/code/GUI/restartschild.gd @@ -1,20 +1,24 @@ -extends Sprite2D +extends TextureRect # Called when the node enters the scene tree for the first time. func _ready() -> void: - global_position.y = -80 + #global_position.y = -80 + hide() func _process(_delta: float) -> void: - global_position.x = get_viewport().get_visible_rect().size.x * 0.5 + pass + #global_position.x = get_viewport().get_visible_rect().size.x * 0.5 func _on_duck_gameover() -> void: - $AnimationPlayer.play("in") + $AnimationPlayer.play_backwards("out-in") show() func _on_restart_pressed() -> void: $"../..".start_game() - $AnimationPlayer.play("out") + $AnimationPlayer.play("out-in") await $AnimationPlayer.animation_finished hide() + + diff --git a/code/GUI/settingsschild.gd b/code/GUI/settingsschild.gd new file mode 100644 index 0000000..550dce0 --- /dev/null +++ b/code/GUI/settingsschild.gd @@ -0,0 +1,21 @@ +extends TextureRect + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + $AnimationPlayer.play_backwards("out-in") + hide() + +func _process(_delta: float) -> void: + global_position.x = get_viewport().get_visible_rect().size.x -100 + #$Logo.global_position.x = 0 + +func open(): + show() + $AnimationPlayer.play_backwards("out-in") + +func _on_back_pressed() -> void: + $AnimationPlayer.play("out-in") + await $AnimationPlayer.animation_finished + hide() + $"../StartSchild"._ready() diff --git a/code/GUI/startschild.gd b/code/GUI/startschild.gd index b23c50d..e249b77 100644 --- a/code/GUI/startschild.gd +++ b/code/GUI/startschild.gd @@ -1,18 +1,25 @@ -extends Sprite2D +extends TextureRect # Called when the node enters the scene tree for the first time. func _ready() -> void: - $AnimationPlayer.play("in") + $AnimationPlayer.play_backwards("out-in") show() func _process(_delta: float) -> void: - global_position.x = get_viewport().get_visible_rect().size.x -51 + global_position.x = get_viewport().get_visible_rect().size.x -100 $Logo.global_position.x = 0 func _on_start_pressed() -> void: $"../..".start_game() - $AnimationPlayer.play("out") + $AnimationPlayer.play("out-in") await $AnimationPlayer.animation_finished hide() + + +func _on_settings_pressed() -> void: + $AnimationPlayer.play("out-in") + await $AnimationPlayer.animation_finished + hide() + $"../Settings".open() diff --git a/export_presets.cfg b/export_presets.cfg index 5d38db1..317b051 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -226,7 +226,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="" +export_path="builds/DuckRun_v2.0.4.x86_64" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false diff --git a/icon.png b/icon.png index 2ca1093499e59f28ccd75d693b516715c73058f9..8b669e9a873b15e66e5dd8e23644943d0013bb96 100644 GIT binary patch delta 1346 zcmZ8geN@tC6n-H^BrUX}4_CT|V`{(Rn;&Qkl2rU)jb*NtCjlY*(pl5YL`cnYDwe;c zmK62{o^*a>S!pgSIa->gc4mu-X(cnP)RW6ose`uG+3r2}-gEAGpXa&HAMex`8ptzi ztuW9Tw+IISa25pdMb;T*D=fy^2a5K<*75R)r-w4OiHv>s+AG=4$*%Y@oOd)iedUyJ zhlYOCJApW70X8R|W9qAXm5}B`iVSA3KI2B7aMJ|O*naugMdPgOxdRT`3cGaI6j?_5 z4fjX==0htppKMs=7Di$vwVsH9CdO}9b{@983^>IdD+=BB4xgLhe?*-$bIsr-zlz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enes/Duck/Duck.gd @@ -5,6 +5,7 @@ const JUMP_VELOCITY = -230.0 signal gameover @onready var alive = true +var state = "main-menu" func die(): print("die") @@ -27,16 +28,30 @@ func _process(_delta: float) -> void: if position.x < -20: if alive: die() - if not $"/root/Global".gamerunning: + + if $"/root/Global".gamerunning: + state = "game" + + if state == "main-menu" : $AnimationPlayer.play("idle") - elif not is_on_floor(): - $AnimationPlayer.play("fly") - elif not alive: - $AnimationPlayer.play("die") - else: - $AnimationPlayer.play("walk") + elif state == "game": + if not is_on_floor(): + $AnimationPlayer.play("fly") + elif not alive: + $AnimationPlayer.play("die") + else: + $AnimationPlayer.play("walk") func _collide_with_hindernis(_body: Node2D) -> void: print("colide") if alive: die() + + +func _color_slider_changed(value) -> void: + print($"../../Gui/Settings/ColorSlider".value*0.01) + $EnteSprite/EnteColormask.modulate.h = $"../../Gui/Settings/ColorSlider".value*0.01 + + +func _on_ente_sprite_frame_changed() -> void: + $EnteSprite/EnteColormask.frame = $EnteSprite.frame diff --git a/scenes/Duck/Duck.tscn b/scenes/Duck/Duck.tscn index b018ad5..7d8c0ac 100644 --- a/scenes/Duck/Duck.tscn +++ b/scenes/Duck/Duck.tscn @@ -1,14 +1,15 @@ -[gd_scene load_steps=11 format=3 uid="uid://8v5mbbnddorh"] +[gd_scene load_steps=12 format=3 uid="uid://8v5mbbnddorh"] [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="Texture2D" uid="uid://dsifqpp5l00cr" path="res://scenes/Duck/ente_colormask.png" id="3_a4v8w"] [sub_resource type="Animation" id="5"] length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("../Sprite2D:frame") +tracks/0/path = NodePath("../EnteSprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -25,7 +26,7 @@ loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("../Sprite2D:frame") +tracks/0/path = NodePath("../EnteSprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -42,7 +43,7 @@ loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("../Sprite2D:frame") +tracks/0/path = NodePath("../EnteSprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -58,7 +59,7 @@ loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("../Sprite2D:frame") +tracks/0/path = NodePath("../EnteSprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -75,7 +76,7 @@ loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("../Sprite2D:frame") +tracks/0/path = NodePath("../EnteSprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -110,7 +111,7 @@ libraries = { "": SubResource("AnimationLibrary_rcmnp") } -[node name="Sprite2D" type="Sprite2D" parent="."] +[node name="EnteSprite" type="Sprite2D" parent="."] texture_filter = 3 position = Vector2(0, -7) texture = ExtResource("1") @@ -118,6 +119,12 @@ hframes = 3 vframes = 2 frame = 4 +[node name="EnteColormask" type="Sprite2D" parent="EnteSprite"] +modulate = Color(1, 1, 0, 1) +texture = ExtResource("3_a4v8w") +hframes = 3 +vframes = 2 + [node name="physicsbox" type="CollisionShape2D" parent="."] position = Vector2(2.38419e-07, -6) scale = Vector2(5, 5) @@ -133,4 +140,5 @@ position = Vector2(-13, -4) shape = SubResource("CapsuleShape2D_46c8m") debug_color = Color(0.906661, 0.254677, 0.42413, 0.42) +[connection signal="frame_changed" from="EnteSprite" to="." method="_on_ente_sprite_frame_changed"] [connection signal="area_entered" from="hitbox" to="." method="_collide_with_hindernis"] diff --git a/scenes/Duck/ente_colormask.png b/scenes/Duck/ente_colormask.png new file mode 100644 index 0000000000000000000000000000000000000000..ba78dd466605d9e6ce5994575388e708e32d05f6 GIT binary patch literal 4705 zcmeHKc~BHr8XrIbCyKCmA+WTK5kY&V=Ky9JMuZuZK?hk59RxG<^z=Y0b1>b^40s|( zJjxXbZlbX;sCW_az)}M&Mm#DS#ZbB;Xmpi$B!pctamAIa`+7jcN~*T3+Wf~<^}O!y z_j51D<1V#~fV0TyW|8&N^abV~!NKrFMxD7H}OnNGZ zgqVCY36XY6&*9iRHvK8x!)1zl-}7-YXXhG=-}BZz;g5SFLaYs{?aUuWjdl+#?R;_S z!*rL49`)aq&wStc`t?)I!QvxUUu8qLXHQ1s)53P|(Fe!pSE>HP85>oQGiz$gzuU91 zqs{3pibE}j7p;0$n$hI@h4Xqs*uCnE@2CdYzvtnG@~tcKJDOU@KZp$3cCB2yP)%Nv z`t&vL@p*as({Em0xZ#TsRVM9)x{9jxW7o$VfvNo!)|924c+beH@o-Lb9eiWrg5LPJ zHI|>Ex8C`>@Aj21b_eu6O1n2Qu)tdDq&=L-;W!mja(SXsE`MD(D0j!oEwZ??v;EF% zlB<(K)^0Zy=2(~8tD?K# zE-pEspToDkF@Y9GVQ7(%LZfOjhx}AI4ZY}=VebP-=UhS>z z$J{dh!I3X0&AC+j-M-*)+%I4HtW5TBzw3M^^zg|Wvl0T>e+Lb^39gIx?KlbL4(>U(1>c)e2g#|c(~4_C3$v(8FVOz6B%VUfoqZ+(z%upsH#A4!FQywFO zVW5Xz=VvghRD0Uha;{R9IOxGrkVP5H4lh9VTb2x^e?!(= zxv?5YIYScx?t{2*S--B`VGOKPDokM_^4Rp03K`7C$8;uw(qa9tM3_j7io+49C`^xt zh2bcIOHmyn6iRe@DNYE;P~i|LrIBWEBSErI0Gvkw9D)qhlO(Q3LJ6S`5r>Hdh!&NK zk7)#J7Rfgovm6SRa4b4eDT9SP^o=Aj2WRxaK?cvKjCuAqiWJH~ zCNnt8rXXAxE|myTsZ=DEh=kHNMhi&`4LXs<6rem&m_x%(3kHe-#Nuq90sw~`)Pl(^ zB+i&DDJD~n3}#b;SkFPV3M?lb&fp51Aps~V6k`GuLq#b<0fq`Nk#q(s#Lyx3CLN{E z|6kVZ;(;Rjr#z0LLHvA&sDDKzlezt0{hv9MV<|z9V^Lr@(O&|MTS=WGPk`00BC>H~ z772Ebfp&c@r+%XqbfQo#NfJ^-A5I7nu~aKWw4o9`qSJ>GdL63O>xh2x2GMDgp0VK; zGCB+J2)F|6>EH^Q?wF|Hw{x*&lk6-2!Vm$9{F*TSK*4-=&v;#NB>z{OL^=$HY%;*F zUj{ZWuov;RUjflf6313WRQq zQWfj=nCs&06m z)e**G)YCt(7WYiww<{r`jO)Qw8IJ@PPOGVCaGo(N;1?&eDgJb}sq*r=Clb;zabOJ}2)&vZ7;}pZehE^n2Bp zH>_NJ>xAhVh%z^zG88NBLb@*XbsV}mV|OKXZUXYR0vE$%wMC(|wBhv>~kgz7=- zrQ!mw1dsUYZf@+34~nl{Jyq)W-k<-rBiEeit8B~LS6{2S7(wipc8cw;^t7?RxMuq9 zPvkeB!LRN-V0=8`RSmx@y*Kl;a!rP&%-T1#$?0ZO)+PBQZXMem%Gd-&ZA|9c{{p3L Bz`_6k literal 0 HcmV?d00001 diff --git a/scenes/Duck/ente_colormask.png.import b/scenes/Duck/ente_colormask.png.import new file mode 100644 index 0000000..b2fbf84 --- /dev/null +++ b/scenes/Duck/ente_colormask.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dsifqpp5l00cr" +path="res://.godot/imported/ente_colormask.png-2d37b08b1228794ae82f602e7c4e215c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/Duck/ente_colormask.png" +dest_files=["res://.godot/imported/ente_colormask.png-2d37b08b1228794ae82f602e7c4e215c.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 diff --git a/scenes/Main.tscn b/scenes/Main.tscn index dd881e8..860f0ca 100644 --- a/scenes/Main.tscn +++ b/scenes/Main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=22 format=3 uid="uid://bb5qp5868y5i"] +[gd_scene load_steps=30 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"] @@ -14,7 +14,11 @@ [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://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"] [sub_resource type="Animation" id="Animation_n8ktn"] length = 0.001 @@ -160,6 +164,29 @@ size = Vector2(4, 15) [sub_resource type="RectangleShape2D" id="RectangleShape2D_0a3yj"] size = Vector2(361, 8) +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_jin1w"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_g0rdc"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xb3tf"] +bg_color = Color(1, 0.50219, 0, 1) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(1, 1, 1, 1) +corner_detail = 1 +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") +HSlider/styles/grabber_area = SubResource("StyleBoxEmpty_jin1w") +HSlider/styles/grabber_area_highlight = SubResource("StyleBoxEmpty_g0rdc") +HSlider/styles/slider = SubResource("StyleBoxFlat_xb3tf") + [node name="Game" type="Node"] script = ExtResource("1_ar2ah") @@ -259,59 +286,141 @@ grow_vertical = 2 [node name="GameOverSchild" parent="Gui" instance=ExtResource("5_ewtcf")] visible = false -position = Vector2(279, 0) +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -53.0 +offset_top = -69.0 +offset_right = 47.0 +offset_bottom = 81.0 +grow_horizontal = 2 [node name="Restart" type="TextureButton" parent="Gui/GameOverSchild"] texture_repeat = 2 +layout_mode = 1 anchors_preset = -1 anchor_left = 0.5 -anchor_top = 0.77 +anchor_top = 0.762 anchor_right = 0.5 -anchor_bottom = 0.77 -offset_left = -73.5 -offset_top = -91.5 -offset_right = -58.5 -offset_bottom = -76.5 -grow_horizontal = 2 -grow_vertical = 2 +anchor_bottom = 0.762 +offset_left = -23.0 +offset_top = -23.3 +offset_right = -8.0 +offset_bottom = -8.3 scale = Vector2(3, 3) texture_normal = ExtResource("6_boo0r") stretch_mode = 1 -metadata/_edit_use_anchors_ = true [node name="StartSchild" parent="Gui" instance=ExtResource("5_ewtcf")] -visible = false -position = Vector2(63, 0) +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -26.0 +offset_top = -118.0 +offset_right = 74.0 +offset_bottom = 32.0 +grow_horizontal = 2 +grow_vertical = 2 script = ExtResource("10_tn1on") [node name="Start" type="TextureButton" parent="Gui/StartSchild"] texture_repeat = 2 +layout_mode = 1 anchors_preset = -1 anchor_left = 0.5 -anchor_top = 0.77 -anchor_right = 0.5 -anchor_bottom = 0.77 -offset_left = -73.5 -offset_top = -91.5 -offset_right = -58.5 -offset_bottom = -76.5 +anchor_top = 0.777 +anchor_right = 0.505 +anchor_bottom = 0.777 +offset_left = -1.0 +offset_top = -23.55 +offset_right = 13.5 +offset_bottom = -8.55 +grow_horizontal = 2 +grow_vertical = 2 scale = Vector2(3, 3) texture_normal = ExtResource("11_4sha5") stretch_mode = 1 +[node name="Settings" type="TextureButton" parent="Gui/StartSchild"] +texture_repeat = 2 +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.777 +anchor_right = 0.505 +anchor_bottom = 0.777 +offset_left = -44.0 +offset_top = -23.55 +offset_right = -29.5 +offset_bottom = -8.55 +grow_horizontal = 2 +grow_vertical = 2 +scale = Vector2(3, 3) +texture_normal = ExtResource("13_0b7u8") +stretch_mode = 1 + [node name="Logo" type="TextureButton" parent="Gui/StartSchild"] +layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -offset_left = -140.0 -offset_top = 40.0 -offset_right = -112.0 -offset_bottom = -81.0 +offset_left = -92.0 +offset_top = 111.0 +offset_right = -64.0 +offset_bottom = -10.0 grow_horizontal = 2 grow_vertical = 2 rotation = -0.397935 texture_normal = ExtResource("14_4hepj") +[node name="Settings" parent="Gui" instance=ExtResource("5_ewtcf")] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -26.0 +offset_top = -118.0 +offset_right = 74.0 +offset_bottom = 32.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("16_0wi25") + +[node name="BackButton" type="TextureButton" parent="Gui/Settings"] +layout_mode = 1 +offset_left = 2.0 +offset_top = 79.0 +offset_right = 17.0 +offset_bottom = 94.0 +texture_normal = ExtResource("15_wi7xd") + +[node name="ColorSlider" type="HSlider" parent="Gui/Settings"] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 0.699 +anchor_bottom = 0.5 +offset_left = 34.0 +offset_top = 93.0 +offset_right = 22.1 +offset_bottom = 34.0 +theme = SubResource("Theme_0130c") +value = 16.0 + +[node name="ColorLabel" type="Label" parent="Gui/Settings"] +layout_mode = 0 +offset_left = 4.0 +offset_top = 93.0 +offset_right = 44.0 +offset_bottom = 116.0 +theme_override_fonts/font = ExtResource("2_m1hnc") +text = "Farbe" + [node name="Score" type="Label" parent="Gui"] layout_mode = 1 anchors_preset = 13 @@ -340,5 +449,8 @@ autostart = true [connection signal="timeout" from="Screen/WolkenTimer" to="Screen/WolkenSpawner" method="_spawn"] [connection signal="pressed" from="Gui/GameOverSchild/Restart" to="Gui/GameOverSchild" method="_on_restart_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="Screen/EastereggSpawner" method="_spawn"] +[connection signal="pressed" from="Gui/Settings/BackButton" to="Gui/Settings" method="_on_back_pressed"] +[connection signal="value_changed" from="Gui/Settings/ColorSlider" to="Screen/Duck" method="_color_slider_changed"] [connection signal="timeout" from="Gui/Score/ScoreCounter" to="." method="_score"] diff --git a/scenes/schild.tscn b/scenes/schild.tscn index e48d75d..dcedd5e 100644 --- a/scenes/schild.tscn +++ b/scenes/schild.tscn @@ -1,52 +1,11 @@ -[gd_scene load_steps=7 format=3 uid="uid://dm307sj4nenjt"] +[gd_scene load_steps=6 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://code/GUI/restartschild.gd" id="2_pxsow"] -[sub_resource type="Animation" id="Animation_2ygp6"] -length = 0.001 -tracks/0/type = "bezier" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath(".:position:y") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"handle_modes": PackedInt32Array(0), -"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0), -"times": PackedFloat32Array(0) -} - -[sub_resource type="Animation" id="Animation_2vs66"] -resource_name = "in" -length = 0.2 -tracks/0/type = "bezier" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath(".:position:y") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"handle_modes": PackedInt32Array(0, 2), -"points": PackedFloat32Array(-98.5, -0.25, 0, 0.0666667, -21, 2.5, -0.2, 2, 0, 0), -"times": PackedFloat32Array(0, 0.2) -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath(".:visible") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [true] -} - -[sub_resource type="Animation" id="Animation_2eby2"] -resource_name = "out" -length = 0.2 +[sub_resource type="Animation" id="Animation_wgvxk"] +resource_name = "out-in" +length = 0.3 tracks/0/type = "bezier" tracks/0/imported = false tracks/0/enabled = true @@ -55,35 +14,29 @@ tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "handle_modes": PackedInt32Array(0, 0), -"points": PackedFloat32Array(-0.5, -0.25, 0, 0.25, 0, -100, -0.0666667, 3, 0, 0), -"times": PackedFloat32Array(0, 0.2) -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath(".:visible") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0.233333), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [false] +"points": PackedFloat32Array(-67, -0.25, 0, 0.2, -2.53268, -250.023, -0.1, 2.25394, 0.25, 0), +"times": PackedFloat32Array(0, 0.3) } -[sub_resource type="AnimationLibrary" id="AnimationLibrary_n8lkd"] +[sub_resource type="Animation" id="Animation_hmob6"] +length = 0.001 + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_ur3ij"] _data = { -"RESET": SubResource("Animation_2ygp6"), -"in": SubResource("Animation_2vs66"), -"out": SubResource("Animation_2eby2") +"RESET": SubResource("Animation_hmob6"), +"out-in": SubResource("Animation_wgvxk") } -[node name="Schild" type="Sprite2D"] -texture_filter = 1 +[node name="Schild" type="TextureRect"] +offset_left = -48.0 +offset_top = -67.0 +offset_right = 52.0 +offset_bottom = 83.0 +size_flags_horizontal = 4 texture = ExtResource("1_wyhk0") script = ExtResource("2_pxsow") [node name="AnimationPlayer" type="AnimationPlayer" parent="."] libraries = { -"": SubResource("AnimationLibrary_n8lkd") +"": SubResource("AnimationLibrary_ur3ij") }