From 45193fc27fe5217ac3b7223f80fe2e952a8fc5e3 Mon Sep 17 00:00:00 2001 From: megamichi Date: Mon, 4 Nov 2024 19:10:10 +0100 Subject: [PATCH] - adding coins - performance improvements - shake effect - keyboard support --- assets/GUI/back button.png | Bin 4732 -> 562 bytes assets/GUI/buttons fucused/back button f.png | Bin 0 -> 558 bytes .../buttons fucused/back button f.png.import | 34 ++++ assets/GUI/buttons fucused/note button f.png | Bin 0 -> 581 bytes .../buttons fucused/note button f.png.import | 34 ++++ .../GUI/buttons fucused/restart button f.png | Bin 0 -> 568 bytes .../restart button f.png.import | 34 ++++ .../GUI/buttons fucused/settings button f.png | Bin 0 -> 565 bytes .../settings button f.png.import | 34 ++++ assets/GUI/buttons fucused/sound button f.png | Bin 0 -> 594 bytes .../buttons fucused/sound button f.png.import | 34 ++++ .../buttons fucused/sound button off f.png | Bin 0 -> 606 bytes .../sound button off f.png.import | 34 ++++ assets/GUI/buttons fucused/start button f.png | Bin 0 -> 554 bytes .../buttons fucused/start button f.png.import | 34 ++++ assets/GUI/theme_slider/slider f.png | Bin 0 -> 548 bytes assets/GUI/theme_slider/slider f.png.import | 34 ++++ code/GUI/restartschild.gd | 1 + code/GUI/settingsschild.gd | 3 + code/GUI/startschild.gd | 1 + code/main.gd | 3 +- code/screen.gd | 9 ++ duck_original.aseprite | Bin 0 -> 653 bytes duck_original.png | Bin 0 -> 210 bytes duck_original.png.import | 34 ++++ export_presets.cfg | 4 +- icon.png | Bin 1464 -> 1493 bytes icon.png.import | 2 +- icon_android.png | Bin 3044 -> 827 bytes icon_android.png.import | 2 +- icon_bg.png | Bin 1732 -> 1733 bytes project.godot | 1 + scenes/Main.tscn | 150 ++++++++++++------ scenes/Wolke/wolke.gd | 2 + scenes/coin/coin.gd | 20 +++ scenes/coin/coin.png | Bin 0 -> 280 bytes scenes/coin/coin.png.import | 34 ++++ scenes/coin/coin.tscn | 93 +++++++++++ scenes/coin/spawner/coin_spawner.gd | 22 +++ scenes/easteregg/easteregg.gd | 3 +- scenes/easteregg/easteregg.tscn | 2 +- scenes/ground/ground.gd | 2 + scenes/ground/spawner/ground_spawner.gd | 9 -- .../Spawner/spawner.gd} | 2 +- .../hindernis.gd => hurdle/hurdle.gd} | 0 .../hindernisse.png => hurdle/hurdle.png} | Bin .../hurdle.png.import} | 6 +- .../hindernis.tscn => hurdle/hurdle.tscn} | 6 +- 48 files changed, 609 insertions(+), 74 deletions(-) create mode 100644 assets/GUI/buttons fucused/back button f.png create mode 100644 assets/GUI/buttons fucused/back button f.png.import create mode 100644 assets/GUI/buttons fucused/note button f.png create mode 100644 assets/GUI/buttons fucused/note button f.png.import create mode 100644 assets/GUI/buttons fucused/restart button f.png create mode 100644 assets/GUI/buttons fucused/restart button f.png.import create mode 100644 assets/GUI/buttons fucused/settings button f.png create mode 100644 assets/GUI/buttons fucused/settings button f.png.import create mode 100644 assets/GUI/buttons fucused/sound button f.png create mode 100644 assets/GUI/buttons fucused/sound button f.png.import create mode 100644 assets/GUI/buttons fucused/sound button off f.png create mode 100644 assets/GUI/buttons fucused/sound button off f.png.import create mode 100644 assets/GUI/buttons fucused/start button f.png create mode 100644 assets/GUI/buttons fucused/start button f.png.import create mode 100644 assets/GUI/theme_slider/slider f.png create mode 100644 assets/GUI/theme_slider/slider f.png.import create mode 100644 code/screen.gd create mode 100644 duck_original.aseprite create mode 100644 duck_original.png create mode 100644 duck_original.png.import create mode 100644 scenes/coin/coin.gd create mode 100644 scenes/coin/coin.png create mode 100644 scenes/coin/coin.png.import create mode 100644 scenes/coin/coin.tscn create mode 100644 scenes/coin/spawner/coin_spawner.gd rename scenes/{hindernis/Spawner/hindernis_spawner.gd => hurdle/Spawner/spawner.gd} (83%) rename scenes/{hindernis/hindernis.gd => hurdle/hurdle.gd} (100%) rename scenes/{hindernis/hindernisse.png => hurdle/hurdle.png} (100%) rename scenes/{hindernis/hindernisse.png.import => hurdle/hurdle.png.import} (71%) rename scenes/{hindernis/hindernis.tscn => hurdle/hurdle.tscn} (83%) diff --git a/assets/GUI/back button.png b/assets/GUI/back button.png index 8972a1f9cbfaa45fdbbe6ad28c919e98a79ef6aa..aa50732d17769efb307453795f028be881e572d3 100644 GIT binary patch delta 168 zcmV;Z09XI~B(emMBNYLJX+uL$Nkc;*aB^>EX>4Tx04R~O2?2Ehf32C(4FCWDX-Pyu zR49?9(!mXYFbDi(aU)l8BD_>=Nhyu|OKar)LjzC<^&hILDIhXq7lS8FNQ>xD zz*|t-+5W%tYy%mb%rRE+&?UwRjPa4f7+(PHzj(7?{a{JKhb34pU(n5!HmtPUr91|v WDPx$IMQ;EA002ov22Mn-LSTXf{6l8| 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?l(NjKG$Bg&zltId#*Ph&qHy;04A$#`QuBU8{6V22Ae&B3f z?YS$T{FV9joWz#2hf3{<_m!T{ojR|k=LyR$;kj++`K`I84Q1{`lK%Zy- z)DJQm{^nnlchFMTpGT)1&h1G#mh$pfxzDaYf3)+}W3MmwnBLAAY+rOjzIf+9-wy9R z_ga_jaMdfel1;6b5qf6g1>mvod8uL7*Vz^K&Tam4_O)|gAcIJye)W^;r)^IoNWv3J zPL9iwlQUcpEMsfUMr;0i%kJu0yJkn>z52@3@;|sTKC#>9mEQWSYyJt{Yy9R%E+;wX zHr;Z2UdQjwoay#{+|jjq)wESvse?#)Ww21)_>=1`w>*3(8vOLR$fdg@1IXih54-oK zC$w&n#6rjXmbJImy^%71eb$F)8nI&goG#kZebTya-8=Q)EExzt-uT##BCk2IXkCHarv)^!F@csRt?cQFT+fXKN=`TFFR_OH^v_*LU=)+xzv*4BU7m^P5mlF|N;X2YFL3zAAM*W1rrZ8*4i z*7Uw9FERV}UCb=FXZ@0jO$QTZ&aCxp*mKf)y6O z>X5Xey1*?|mkMT4zcf>4iSiJ@C#e99`p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buttons fucused/back button f.png b/assets/GUI/buttons fucused/back button f.png new file mode 100644 index 0000000000000000000000000000000000000000..5b7a704df2e9626fe604de5502988ee86edb014c GIT binary patch literal 558 zcmV+}0@3}6P)EX>4Tx04R}tkv&MmKpe$iTcuJeB6bjQ$WS}kMMWKJ6^c+H)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfc5qU3krMxx6k5c1aNLh~_a1le0DrT}RI?`msG4PD zQb{3~UloF{2qAz$%pfK)Q=b#XG(5-GJ$!t6^ClDu?Zdk+{#M7IW z&Uv3W!pf3Dd`>)W&;^Mfxh}i>#<}FMpJzslY-XM~LM)WJSngt0HdNv%;;5o(l<&{E ztZ?4qtXAu+eNX0S*p< zSc$UNJ>K2d-P^xs+Wq|i(9Uwqt(nmc0001GNklnLRWRHNxu$0HlD~j9m=gydj!_UxAe1rKkRX=fwsxxS10=#Y2}ECoskZ w7~`jdiv{NgOA0^})kN^Mx literal 0 HcmV?d00001 diff --git a/assets/GUI/buttons fucused/back button f.png.import b/assets/GUI/buttons fucused/back button f.png.import new file mode 100644 index 0000000..3d0a1d7 --- /dev/null +++ b/assets/GUI/buttons fucused/back button f.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://fon35dtl2fdd" +path="res://.godot/imported/back button f.png-efb6ddf8f429550b2341f025ce20dd5a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/GUI/buttons fucused/back button f.png" +dest_files=["res://.godot/imported/back button f.png-efb6ddf8f429550b2341f025ce20dd5a.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/buttons fucused/note button f.png b/assets/GUI/buttons fucused/note button f.png new file mode 100644 index 0000000000000000000000000000000000000000..c9bfbdfe7b789937d963e5abb03f903cd857fda6 GIT binary patch literal 581 zcmV-L0=oT)P)EX>4Tx04R}tkv&MmKpe$iQ>CR;9qb_DkfA!+MWr~_DionYs1;guFuC*#nzSS- zE{=k0!NHHks)LKOt`4q(Aou~|?BJy6A|?JWDYS_3;J6>}?mh0_0YaNxS+2rbDicGQdqDJc?d{()o&J6RjjwXCTSMo40001dNkl%|o%)cDvn z*9s=U=o?N>z%V?})A9*9ZMO4&fN!||XQx)+JOD@lPDH&A3PvR3!{mfb&GwWobKxy- T8Avmi00000NkvXXu0mjfo#F`! literal 0 HcmV?d00001 diff --git a/assets/GUI/buttons fucused/note button f.png.import b/assets/GUI/buttons fucused/note button f.png.import new file mode 100644 index 0000000..84d3504 --- /dev/null +++ b/assets/GUI/buttons fucused/note button f.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c8um1xy8sixhb" +path="res://.godot/imported/note button f.png-1397d916f56d1ff7f08e313d3b74bff7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/GUI/buttons fucused/note button f.png" +dest_files=["res://.godot/imported/note button f.png-1397d916f56d1ff7f08e313d3b74bff7.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/buttons fucused/restart button f.png b/assets/GUI/buttons fucused/restart button f.png new file mode 100644 index 0000000000000000000000000000000000000000..cb9452a8b9a927cf9257ad218f4f2ecb6bea8b9c GIT binary patch literal 568 zcmV-80>}M{P)EX>4Tx04R}tkv&MmKpe$iTg4Bm4i*#<$xy|?E-K;vxAeOimEM7-bHwp_qjhukCHVR;1h_WOgAjz4dR(i zOXs{#9AX7YAwDObFzABBk6f2se&d{X*v~UVMk+Z^93mF-EiAV%D;O&AG;vr_HOlv= zT~;`6aaKze*0?8sVKA$$EOVXaFydIm5=01)Q9%(UScuT7kzyiA`!NsykmDE0C6lWN zMveuPp+a)};D7MDTQfH`=_UnZK>Lere~bbhyFk5a+uz5wT|WT=&%l+|^p|VE>?i5f zrWQT|`nG|K>!v2}0hc?#;FB&Hk|PCZ`g1wp{fxdT1N7el-D_@djeVRx04eG!aRVG2 z0%Li~UiWx+XKQc&o@w;=1HY+q#pI@_i2wiqZb?KzR49?9lF0000EX>4Tx04R}tkv&MmKpe$iQ>9WWDs~WY$WWcEgNiuTDionYs1;guFuC*#nlvOS zE{=k0!NHHks)LKOt`4q(Aou~|?BJy6A|?JWDYS_7;J6>}?mh0_0YbgZG^;BHXu55t z5^*t;T@?eb2*QtkOkhA}mN6$uNpu`v_we!cF3PhypZjz4syT}RK9M-a4AUmwAfDN@ z4bJ<-VOEq?;&bA0lP*a7$aTfzH_io@1)do;)2VslFtJ!@W2KE*(bR~ii6g3}Q@)V# zSmnIMSu0mr^Pc>Lp`5<5%ypV0NMI35kRU=q6(y8mBTB1IiiH&I$2<6kUB5&wg=bb;{@U#SDLpQP7X zTI2}m+XgPKTbi;5TgFOm`{W#Xap$ z5H+?6-j9adI|Bw_AhZV&krF^uMjHhmOpvWxTmY6J?aF7sQd0*Ez6F&mNdBsZDbyBB zNzdMLl^~~%kI79ihnpZkXU|b)&+{L41pGbK3>@hNOj{_^GVJmM00000NkvXXu0mjf DVt@1V literal 0 HcmV?d00001 diff --git a/assets/GUI/buttons fucused/settings button f.png.import b/assets/GUI/buttons fucused/settings button f.png.import new file mode 100644 index 0000000..9b61490 --- /dev/null +++ b/assets/GUI/buttons fucused/settings button f.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c66oktmsmdu0f" +path="res://.godot/imported/settings button f.png-2be0c78f63190ae3eba8fa51c122327b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/GUI/buttons fucused/settings button f.png" +dest_files=["res://.godot/imported/settings button f.png-2be0c78f63190ae3eba8fa51c122327b.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/buttons fucused/sound button f.png b/assets/GUI/buttons fucused/sound button f.png new file mode 100644 index 0000000000000000000000000000000000000000..ea737a7f70474318b732f249cf122a09bb3d8a53 GIT binary patch literal 594 zcmV-Y0EX>4Tx04R}tkv&MmKpe$iQ>CR;9qb_DkfA!+MWr~_DionYs1;guFuC*#nzSS- zE{=k0!NHHks)LKOt`4q(Aou~|?BJy6A|?JWDYS_3;J6>}?mh0_0YaNxS+2rbDicGQdqDJc?d{()o&J6RjjwXCTSMo40001qNklT^hJifQVK$4N?du&A3zYTCb_+i3vcq4J@o$ zq%e2T382W`^|YW@k@qwH&}aP!m!Kj8*yAy?iF7f(p)Stl2)HpwKdCP305J7Nxp!DH gV3l*&khh0)0kS1BHj+}&aR2}S07*qoM6N<$g6qEyj{pDw literal 0 HcmV?d00001 diff --git a/assets/GUI/buttons fucused/sound button f.png.import b/assets/GUI/buttons fucused/sound button f.png.import new file mode 100644 index 0000000..09e07d3 --- /dev/null +++ b/assets/GUI/buttons fucused/sound button f.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://botwq4rflsfl3" +path="res://.godot/imported/sound button f.png-93410106fda92fcdc0d46920cf415401.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/GUI/buttons fucused/sound button f.png" +dest_files=["res://.godot/imported/sound button f.png-93410106fda92fcdc0d46920cf415401.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/buttons fucused/sound button off f.png b/assets/GUI/buttons fucused/sound button off f.png new file mode 100644 index 0000000000000000000000000000000000000000..f8f9af882d74179ba3507dc992ff09b9d9f6b479 GIT binary patch literal 606 zcmV-k0-^nhP)EX>4Tx04R}tkv&MmKpe$iQ^is$9qb^|AwzYtixzRLRVYG*P%E_RU~=gfG-*gu zTpR`0f`cE6RR)R(glehxvq5hjdR&$foDd{Ty~x~LM)d1Sm|R{F*V`@aZJ^8$`|q- zRyl8R)@lvby(fQRsHm?jbDd@sX)Iz15=1Cypo$u7#A($@v5=+xl!t%J^-JVZ$W;X+ z#{%lmAiI9>Klt6PRhpjaB!yDI;EUsYi~~cvK)dNU-^Y&AJ^}pCz?I(f*IU5sC+W?e z7CQpM+rY(jPgC}Q%N=0!$&gLimHae?QVDoJqi-qzBey_stDJY@9p0+-Tr<6x6E?F9$G%I0001$NklcDV=Xw-GsR&Q_V4L5ci_@%07*qoM6N<$g6)$HQvd(} literal 0 HcmV?d00001 diff --git a/assets/GUI/buttons fucused/sound button off f.png.import b/assets/GUI/buttons fucused/sound button off f.png.import new file mode 100644 index 0000000..d224eb6 --- /dev/null +++ b/assets/GUI/buttons fucused/sound button off f.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dui5dacb5lpfg" +path="res://.godot/imported/sound button off f.png-3945d9207f642dfe8529e5786a9b11c3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/GUI/buttons fucused/sound button off f.png" +dest_files=["res://.godot/imported/sound button off f.png-3945d9207f642dfe8529e5786a9b11c3.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/buttons fucused/start button f.png b/assets/GUI/buttons fucused/start button f.png new file mode 100644 index 0000000000000000000000000000000000000000..9f73d0d48eb18d8dccc5a8e099b08fd966f2a745 GIT binary patch literal 554 zcmV+_0@eMAP)EX>4Tx04R}tkv&MmKpe$iQ^gM|f_6}Gh)|u{MMWHI6^c-y)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfc5qU3krMxx6k5c1aNLh~_a1le0HI!Hs@V|*RLwF{ z@tBy&u8Li+=)o`sFov+iOnokyOu%z|-NVP%y9m$nKKJM7Q*tH)d?Im_>4rtTK|Hf* z>74h8gRCei#OK6egDyz?$aUG}H_ioz1)do+(y4jkAhB3zW4Vo4(NKw}i9?F2QNECI zS>e3JSuIyt^Pc>LftOtZfq;1F`slm`y}0001CNklC&g#Z8m07*qoM6N<$f_vNdeEEX>4Tx04R}tkv&MmKpe$iQ$;B)f_4yb$WWc^q9Ts93Pq?8YK2xEOfLO`CJjl7 zi=*ILaPVWX>fqw6tAnc`2!4P#J2)x2NQwVT3N2zhIPS;0dyl(!fY7Wm&FV=2nr@q! zR8q|4SH-?pgb>6aA`oR}8FP}9hVS^gM}V()ah~OW?#~fX3l;+cB5{HlrcJy-JhN#V zocD>NtSqa<=fo2xU6A;Z>x##3oJ%eXJTq!$GxNkzVzJc4N*A-TsS!^T$5c(Hd?Dwt z%6W^kR;{!4J^2g61$||i>oiA^!XlO+L4<-jDyYInoK~F_3mMu^`uIm&zeFyDToo{K zET9Grvg-%`gWug+#i>azDVzj)UmWLS4CvbhS`EkfK6aee2@re+uJn$-)&yohNpEzt z*by+W4P0DzG-VIC+yRE44B3=jDM(W&7J>IO`ldWEbPI&myx!XTIDG)J)K&ThI5-5x zOO(Ct^X~rc-u^w)?(YX%i*lWX<+U&X003M`L_t(2kz-(>05BqR{{R2~pP&XtMz|h0 z1Fo@=5sMZmsQ-^*03*>Fu^7Mv7ev+=gM&s>$HagRVi*`0mf)b#0H$VK8kZ2GdHCB* mQ9M(g!Y~ZL1CTAG2mk;gIyWs=iCDV;0000 void: $"../../Audio/GameOver".play() $"../../Audio/Gui-in".play() show() + $Restart.grab_focus() print($"/root/Global".hiscore) if %ScoreContainer.get_score() > $"/root/Global".hiscore: $"/root/Global".write_save() diff --git a/code/GUI/settingsschild.gd b/code/GUI/settingsschild.gd index c25bcfd..db29900 100644 --- a/code/GUI/settingsschild.gd +++ b/code/GUI/settingsschild.gd @@ -3,6 +3,7 @@ extends TextureRect var audio_bus_music = 1 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_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: @@ -18,6 +19,7 @@ func open(): show() $AnimationPlayer.play_backwards("out-in") $"../../Audio/Gui-in".play() + $BackButton.grab_focus() func _on_back_pressed() -> void: $AnimationPlayer.play("out-in") @@ -34,4 +36,5 @@ func _volume_slider_changed(value: float) -> 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_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)) diff --git a/code/GUI/startschild.gd b/code/GUI/startschild.gd index 64c3273..1d53da3 100644 --- a/code/GUI/startschild.gd +++ b/code/GUI/startschild.gd @@ -6,6 +6,7 @@ func _ready() -> void: $AnimationPlayer.play_backwards("out-in") $"../../Audio/Gui-in".play() show() + $Start.grab_focus() func _process(delta: float) -> void: $Logo.global_position.x = -5 diff --git a/code/main.gd b/code/main.gd index bbd9f88..150002b 100644 --- a/code/main.gd +++ b/code/main.gd @@ -8,9 +8,10 @@ func _ready() -> void: func start_game(): $Screen/Background/Floor/EasterEggFixCollision.disabled = true - $Screen/HindernissSpawner.del_all() + $Screen/HurdleSpawner.del_all() $Gui/EastereggSpawner.del_all() $Screen/SpawnTimer.start() + $Screen/CoinSpawnTimer.start() $Screen/LevelUpTimer.start() $Screen/Duck.start() $Gui/HiscoreContainer.hide() diff --git a/code/screen.gd b/code/screen.gd new file mode 100644 index 0000000..aeacc5e --- /dev/null +++ b/code/screen.gd @@ -0,0 +1,9 @@ +extends Node2D + + +func shake(intensity): + var preview_pos = global_position + for x in range(14): + global_position.y = randi_range(0-intensity,intensity) + await get_tree().create_timer(0.02).timeout + global_position = preview_pos diff --git a/duck_original.aseprite b/duck_original.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..0d79a13e8fcfadab2ef97c61ffd0278780d91760 GIT binary patch literal 653 zcmb`E-%C?r7{}kEjS)8HRUlpLMN7PMj%W=9K^(!^MYU)nlzy#Eb}qJpa6u3#L&Y&x z6xDu2c40TB7b0#34YBBEgm@K8SqTO~Amrr~PoJ}r`3LwM-Ve`tUUq5bA4 z9EfbfKvsu0zHGtL`X1CNA+oc17=JVl!C9eiY+>4x%p}w| z<_itgLjTB;Ix?|wy->M3bUBj9r@PC~XZ-CIZMAK2CGWfv{XGBbzHj%~7`z-Uwm-A0 zK2|Hg+WPs?T{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=uIb8+ zVGS}na~K^LX=w-72*9XrK0PN!9FwPYL1E1%(rLT}_SQZG${C-bvD{z68;qY&QPKJI zppksq=Sq5{^n{n9eLaUv>H4|$>Q0{>_dB($qdfOIvek6%xZp7=uE46&H5U;a0(vjv zkBD}aU2}j+>k2t2uW_fqBu>!7=0O>Ydw8g8&K@C!?xKH zU%Z*AP~h4hRQRmo=v(xy6V;rGNAmfACCK2Wl&hEF172u>AHW(!tN~hB|vd^Hg6eNVfFY& zX|FxM(TGZgWV&#*=k*Y)t3VNX-ib9OU8K|ng8fStYd?tP(vl!C%K;_so2ldobZZrt zl?KWd-VrhcI6K*dg<%I zT@$_*MLaA(Yxn=`?ESAb@7vUAp;GAMf7Wu(nXV!p=I1VA-2Q(|dbT}Nu@?GiTS|?w zhG-@O*Ez|?As{uC#RI~9p|SMCihq&Fe#Ac<9n3}pZ|mL4$a_huCNT@~AKLYOz#n5M zkwXRP1@q&CAREd~bVrL&i7W5&x4Am3)X5F$nf1iAl2!%y>CWsBM1pzJuGh~Zmiwkoq?&rLt-n>A#Bb763f_Pau8)_e?XE%=M}P>91P`++Me6abUThW4aE(xvjHjnNkl void: func _process(delta: float) -> void: global_position.x -= speed * delta + if global_position.x < -30: + queue_free() diff --git a/scenes/coin/coin.gd b/scenes/coin/coin.gd new file mode 100644 index 0000000..5e85b24 --- /dev/null +++ b/scenes/coin/coin.gd @@ -0,0 +1,20 @@ +extends Area2D + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + $AnimationPlayer.play("rotate") + +func _physics_process(delta: float) -> void: + if $"/root/Global".gamerunning: + global_position.x -= $"/root/Global".speed*delta + + +func _on_body_entered(body: Node2D) -> void: + if body.name == "Duck": + $AnimationPlayer.play("explode") + await $AnimationPlayer.animation_finished + queue_free() + # add coin + if body.name == "hurdle": + queue_free() diff --git a/scenes/coin/coin.png b/scenes/coin/coin.png new file mode 100644 index 0000000000000000000000000000000000000000..5a26b3ab8f0038db5f7465d1777f2442ed09465a GIT binary patch literal 280 zcmV+z0q6dSP)Px#(n&-?R49?PkgPq{2v{5lSD0t;Ve&Y6nCtCKXJM62unBHV zCn&B(vYLn=&qsFFn&q>&|nsP<1l^0>5!%yw3x3heLi> z4%$Vw><*DZ^r!hh1h+!Atj|yrq^C~@dqRM+LYhA()C2%q void: + speed = $"/root/Global".speed #get_parent().speed + _spawn() + + +func _spawn() -> void: + var coin = preload("res://scenes/coin/coin.tscn").instantiate() + speed = $"/root/Global".speed + + var v1 = 1.5 - (speed / 200)#260 + var v2 = 2.0 - (speed / 200) + coin.global_position.y -= randi_range(0,2)*16 + $"../CoinSpawnTimer".wait_time = randf_range(v1,v2) + add_child(coin) + +func del_all(): + for child in get_children(): + child.queue_free() diff --git a/scenes/easteregg/easteregg.gd b/scenes/easteregg/easteregg.gd index 6215bce..8305e24 100644 --- a/scenes/easteregg/easteregg.gd +++ b/scenes/easteregg/easteregg.gd @@ -9,4 +9,5 @@ func _ready() -> void: # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: - pass + if global_position.y > 100: + queue_free() diff --git a/scenes/easteregg/easteregg.tscn b/scenes/easteregg/easteregg.tscn index 48ad433..31dc800 100644 --- a/scenes/easteregg/easteregg.tscn +++ b/scenes/easteregg/easteregg.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=3 uid="uid://co76l7v0x2t8t"] [ext_resource type="Script" path="res://scenes/easteregg/easteregg.gd" id="1_3dnpr"] -[ext_resource type="Texture2D" uid="uid://bp48x77dixrme" path="res://scenes/hindernis/hindernisse.png" id="1_al4up"] +[ext_resource type="Texture2D" uid="uid://bp48x77dixrme" path="res://scenes/hurdle/hurdle.png" id="1_al4up"] [sub_resource type="CircleShape2D" id="CircleShape2D_ruej1"] radius = 8.06226 diff --git a/scenes/ground/ground.gd b/scenes/ground/ground.gd index b1522b5..414ae65 100644 --- a/scenes/ground/ground.gd +++ b/scenes/ground/ground.gd @@ -10,6 +10,8 @@ func _ready() -> void: func _physics_process(delta: float) -> void: if $"/root/Global".gamerunning: global_position.x -= $"/root/Global".speed*delta + if global_position.y < -30: + queue_free() func screen_e() -> void: diff --git a/scenes/ground/spawner/ground_spawner.gd b/scenes/ground/spawner/ground_spawner.gd index 40a5359..6f970bc 100644 --- a/scenes/ground/spawner/ground_spawner.gd +++ b/scenes/ground/spawner/ground_spawner.gd @@ -21,15 +21,6 @@ func probability(prozent): return randf() > 1 - (0.01 * prozent) 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": change_in -= 1 if probability(60): diff --git a/scenes/hindernis/Spawner/hindernis_spawner.gd b/scenes/hurdle/Spawner/spawner.gd similarity index 83% rename from scenes/hindernis/Spawner/hindernis_spawner.gd rename to scenes/hurdle/Spawner/spawner.gd index 1cc3ceb..bbea231 100644 --- a/scenes/hindernis/Spawner/hindernis_spawner.gd +++ b/scenes/hurdle/Spawner/spawner.gd @@ -7,7 +7,7 @@ func _ready() -> void: func _spawn() -> void: - var hindernis = preload("res://scenes/hindernis/hindernis.tscn").instantiate() + var hindernis = preload("res://scenes/hurdle/hurdle.tscn").instantiate() speed = $"/root/Global".speed hindernis.speed = speed diff --git a/scenes/hindernis/hindernis.gd b/scenes/hurdle/hurdle.gd similarity index 100% rename from scenes/hindernis/hindernis.gd rename to scenes/hurdle/hurdle.gd diff --git a/scenes/hindernis/hindernisse.png b/scenes/hurdle/hurdle.png similarity index 100% rename from scenes/hindernis/hindernisse.png rename to scenes/hurdle/hurdle.png diff --git a/scenes/hindernis/hindernisse.png.import b/scenes/hurdle/hurdle.png.import similarity index 71% rename from scenes/hindernis/hindernisse.png.import rename to scenes/hurdle/hurdle.png.import index 14fd030..088fc19 100644 --- a/scenes/hindernis/hindernisse.png.import +++ b/scenes/hurdle/hurdle.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bp48x77dixrme" -path="res://.godot/imported/hindernisse.png-2e17c6b239dd45768c8c51c61d217402.ctex" +path="res://.godot/imported/hurdle.png-68dde4d9f095a6d006bd2c90c4279ac6.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://scenes/hindernis/hindernisse.png" -dest_files=["res://.godot/imported/hindernisse.png-2e17c6b239dd45768c8c51c61d217402.ctex"] +source_file="res://scenes/hurdle/hurdle.png" +dest_files=["res://.godot/imported/hurdle.png-68dde4d9f095a6d006bd2c90c4279ac6.ctex"] [params] diff --git a/scenes/hindernis/hindernis.tscn b/scenes/hurdle/hurdle.tscn similarity index 83% rename from scenes/hindernis/hindernis.tscn rename to scenes/hurdle/hurdle.tscn index 2aace84..9f5c041 100644 --- a/scenes/hindernis/hindernis.tscn +++ b/scenes/hurdle/hurdle.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=5 format=3 uid="uid://cp43g3amm8a6f"] -[ext_resource type="Script" path="res://scenes/hindernis/hindernis.gd" id="1_e0hqe"] -[ext_resource type="Texture2D" uid="uid://bp48x77dixrme" path="res://scenes/hindernis/hindernisse.png" id="2_thg8w"] +[ext_resource type="Script" path="res://scenes/hurdle/hurdle.gd" id="1_e0hqe"] +[ext_resource type="Texture2D" uid="uid://bp48x77dixrme" path="res://scenes/hurdle/hurdle.png" id="2_thg8w"] [sub_resource type="CircleShape2D" id="CircleShape2D_orpyb"] radius = 5.0 @@ -9,7 +9,7 @@ radius = 5.0 [sub_resource type="CircleShape2D" id="CircleShape2D_r1tmj"] radius = 5.0 -[node name="CharacterBody2D" type="CharacterBody2D"] +[node name="hurdle" type="CharacterBody2D"] collision_layer = 3 collision_mask = 3 script = ExtResource("1_e0hqe")