From bb13843578142f3faf0a6871a6d90582bf8bb398 Mon Sep 17 00:00:00 2001 From: Jakob Feldmann Date: Sat, 23 Sep 2023 17:36:09 +0200 Subject: [PATCH] feat: thwomp indicator shader + code, portal art --- assets/Sprite-0001.png | Bin 0 -> 325 bytes assets/Sprite-0001.png.import | 35 +++++ assets/contraption/PixelPortal.aseprite | Bin 1831 -> 2643 bytes assets/contraption/PixelPortal.png | Bin 938 -> 1442 bytes src/Actors/Blobby/Blobby.tscn | 4 +- src/Actors/Friendlies/WhatAreFrog.tscn | 1 - src/Levels/Level 0.1.tscn | 3 - src/Levels/Level 0.2.tscn | 6 +- src/Levels/Level 0.3.tscn | 6 +- src/Levels/Level 0.4.tscn | 6 +- src/Levels/Level 4.tscn | 22 +-- src/Platforms/FlyingLaserCutter.gd | 44 +++++- src/Platforms/FlyingLaserCutter.tscn | 75 +++++++++- ...serCutterTriggerRayShader.gshader.gdshader | 59 ++++++++ .../FlyingLaserCutterTriggerRayShader.tres | 141 ++++++++++++++++++ src/Sounds/default_bus_layout.tres | 2 +- src/UserInterface/Screens/HUD.gd | 13 +- src/UserInterface/Screens/HUD.tscn | 55 +++++-- 18 files changed, 411 insertions(+), 61 deletions(-) create mode 100644 assets/Sprite-0001.png create mode 100644 assets/Sprite-0001.png.import create mode 100644 src/Platforms/FlyingLaserCutterTriggerRayShader.gshader.gdshader create mode 100644 src/Platforms/FlyingLaserCutterTriggerRayShader.tres diff --git a/assets/Sprite-0001.png b/assets/Sprite-0001.png new file mode 100644 index 0000000000000000000000000000000000000000..c66daaa468f220844c7719a74f5f958de4102a25 GIT binary patch literal 325 zcmeAS@N?(olHy`uVBq!ia0y~y5bgl7c{tdBWM6-H7?5Ht4sv&5Sa(k5C6M#q)5S5Q uV$R!xhKxYop#@+4b2+QwMAVkkP>O=DMX9wtj0b8D`f(6udobv+cu+QAU1 zj?{H14;yl_D4H;>+ZtzxQ;Z@l4|ynYm-|nrKkogj&pF>ezJGl`-`DH&{@jAgjUfSg zd`R+!KVbmyaatFM002O@HhTb)dk|^~aazee0kr@f^-}h2)c)CkZ<7d>-di&L%VrCzY8b8{Qm{U(a-&_*w5q25*lhy4Bic%#TX<&Sze zh;ADDJp0Qbp??5Hz^^mJ_0gm|*E<_lip9^pNT{tNR(Aw{cc)VXb~v^&xEt5VWjZST z#=*&Bj%Lc}XSANAY9E#$vWVLe;f-^mc6m8jQpM_^nN`s|XLMyiy)fu5o5xijBhHbh zNSSYyk6FeE$m`=6SMs$Sk&g`P93{GFCK_!<^=z5NGX?i;Rf8SLI>wNeB+ak2t+W6L zU=FN8G?%q92Vg*A2|XNag-HZCtF_0`KAneozQY~kKejH8mD9ty-TH+tBn#3u4-Q|| zYhR=%v7N7KZN0mE-WMY^kLMhJ+c1H~mMTKmNh(eJU?XA0CiL*aEzzg3NmyrW-0^t; zFmvs?o}u-HJ!Fmjm&cbiN81X}bOWq)lbZ;IgZniO^feCTTkoD$GCw%IVC~eli&xwU z)9XUR)*T!JkvLS^+bSNfXZxA3m5(dEeRE4{YB}c|(cjM#|1W<$W=R@btaujvJWmig z8r_brN8q}=eB0U0ru7@;T@sgzm63CG*9DPXTiEIy;I9$S@9EIeMhH_tgC6OM;`%ub*ZORn~lGVww_YcvvF1ok%P zn<<-^J<32gQnv+$rhB_d?IV2TA-i1PlIwH71D@u}n)q)6tuXMr8c6-dz`{2M03eqQ z)z{>p4Xbf5ToE9lR_b_%i>8g(G+1cgyF_VwI zlc|`Sr?hfT@4fXB9hjO$F=R9>7LANs3nI#pjl0VtY{n?vbVA5q8Nu=of*W2WOmWBl zqjqKa*-!QtM9gpl8tL(M@);ToUY=AzF*`7jl|BrpP#Hh>shaMfA(p0 zh%+1|BHydF!B^N`U!eGspRr>qY!#HlEh;l{QqZJO%qT3yQQGzUPYeydt>7u z_O11WE;=ZqO-5IgS$J5;F+W=4F#lp+x$oz>BRdjqRd`a>GSzfRL2sUO&SC4QM$f|B zmuyUW2)c@ezhc@1ieG?C)#XTzujoc8$&n(g$|@8n;?R9`r>cvcbtf5^t!-XLxQXcA zIR1GVNF$INFqVwG&MpSawQNEBn{$HXRsE0~ik==+IZd{t$|vh)LI{le{jSxfN&|m` zg|o~S99}%!R}y6?a}^Rx`5xXaJnKu<`3adBx*PPemWynvS z2MKCW8alrI2)zuBT*L8YJ3#^P>-A)@ww|muq)NtDh?4CmZ97XN!I)Lg)m2Qog{a1~ zAWQ_A6aDV8w88zIU2RrL`~h+c|D^3t7EY2Vq;=eTr7mvU4IML^fh_nBO;9DC*1jJ= z=JZ6E*QJTHbFzF z4-0rZ>y31tcCR~nZcFm^BL?Y>}4Hg^H9nZBY(&gZ(=K9xS$(Zbl#qJZmb_ic(@6xGw^)XiJ1_ j)C2QG#lwv7W~Q8`uOE=&3%_Y_Q-@(MwFLG}GFtutV1Nhm delta 908 zcmcaCvYd}eoqZxx9q$!p28LfBSs79o7#LVL_TFY;*^!#+ zb*yGxl4sePrIL!$rolSbwrmIx-Z(2$So>Iw%`wNAlb=(abgOfBt{v-15_(pU?Y##aRCG`7L$1 z7wxysOu4#wVr7cyZGmb2t6r#Hi`Z0-uJuGR@TllEWSTE=v}fo$Cbtf ze}O*y^^p{a^TI8 zes`mvl5BZas{ZFPGOAFa!-F@=M z_g`n@Pk*hf>;7fC`Twapd-o;Jv%eW~3Leyy=)_W87P%KFJq{&dg#xaM%gnv)^t zt)q^~Zuwff-K6^NbJ5LTtu;T%{bp+a_2cw6G><-mdDNEcFfc+B?rR1gkJ%>v;!1K! z?zD53&WcB!545QN^ql6aVVJ@FPw9`crE1S3~ z?aW!)S8oQ|o;e|>yNLbm-S^X;t*E<~^sP>P>z?CvPmT32K0x!~1(**Fxj;$w!o8Cx zFB)4{@`S6W>jxGJG`V~h-tTzOLG7r!j_>854KtoCjZ^(0IsNjMxwCY{H%2T=`*Jv9 z%au1PO4B0DvhHo%qjuQIcUkL<-N!dAsr<6$mQCZ8jH}yRS)D#_ky=}tToJwKwVLhQ zolj3n-GAr$@A-6_*L&}u{<_EXx9y{of8V`L5A=UMKk~2C+w6&3&h20Gd0KATIfI$T cQps$!RrjW*U9)*_IDen|-JShw6aBps0XI3lBLDyZ diff --git a/assets/contraption/PixelPortal.png b/assets/contraption/PixelPortal.png index a2854b50f732073880989dcdcfefa9477bd80a72..9b6c3c8185567b2f32e619695a62e55a5b94cff0 100644 GIT binary patch delta 1411 zcmV-}1$_Fd2cip*Fn%9mt73njje&MAfX#b5kz|G!9!h$ zClA^}*ad~6R7${0Zwd9#lH7U`f>@M-!Umx=LQWB)2M;}!5C|^pmJrZFv}T*KvR<;h z9yZ@&-n?(-&AhkSmreHv!FAre`F->IzWMWJJ_i^A{p;)u`ht0RgHTZ`?5Qn-2!q@*gg@LX8+b`H^H)#`OFl5em&wF%b)zR?ndGFB7j1} zM18sQsxp-qxM5(!FLz#5X2O36mf$*S@~l(fI%@Jv1%IsoQN~^;+voXVDadt{E92hfIBfa3j&fxt{N7gh#PP$k)r~hZKwGJ> z?{M3(E`NHKI}@J02-#--HD+S%0Q>i=TZU5M(bCnl*pVY=p#4U%Yn% zV}Ao#yn6D=XaD{3U2hd3F%Cq2z{uz+Tq#|10H9IGxLoID+%MmCO+*MBiFNXRp5CQP zN!`t`ieK!!4X%`~ITSTI{z&-&gUe0Uphh9XZe6412gsc_^}Yx>5@O{C3@$evRp)ij zqvQuf^}Gx*5;%U}?Xd2CesH7^aczX$vKc#GKAAh2h z$~)zqnoCh2&Ii5KwAV_>Y~_ZogWYfCiwyD)io?!y@g7v z?h_(6o^z>;I!`bafj)|?@&n>T0r#$HegJ(~QKzZna_3D!hb1z4TsVK)`#a+dDWgFAB$l~+tHAF4eBg_$QOLN1%T32-qEUI@AbdYS`9)~T zuc{X-Kfq=v$aSOS2Z&J+2RiQq%qk#eX>cOwgy5db=YnAdi~Kes&?G4i74BS6ey`^a zMOBamFg+CQ$zyR@4C?&C)mvU!tYdM)e$5Xsy%;g!@8<`oi2L~g|C9WH{{VMisv-(a RCHMdU002ovPDHLkV1hL2xl;fD delta 904 zcmV;319$wQ3#tc@Fnjn?4`3mY4o zfSpBnSfmTs*rZ93B3NsqaFu_7mO&(SDj{&4JPVz$yEijCv%BxD@8bu7+{l7Fi}LVk38^Bt0$tBU(9^h+CLr(S4ctMx^ zyY`RJCBw$A_kYLE@4K(wi289H8vY+I?m27u{@G9VicE3bdH}eFMEm~asWQq6*fP-Y z`;({2B>dziNCBIuq%Ie*iAw4yunLG-dpXDGf?wqU5(~HK1riHuy+FMLhK5N2n#Pi& zPI?^1KyuVck3#^f0P1e7LCP3i@ZTx`J`(((f)CEZA%E+`*w_b=l%KP3$od$+;{kR! z34m!3n^~E@}{MbaXG710gR*UMdrb2gj?OG36R?Dwl>lDA^0n5eQNUab8rF||Q zP=cS_1bvNZgz(#Htlu?%R7gw{k!d3&mXm)9inb+0@5ADl5P;DMO|)kgoktU%ngvFVqLdPRb7$8qjwEK#KM4F{tA)1y3J8 z$TH^S0i^|qg=Ec3FnSM|6u?#H*u2`<0CPf}ACLk`et;j;$O#x*l^>8|L9DMfKOi@< z<$nigq4BJ`K5VEPp)n>YIO4-mz;ZD+*caK&{$4X%Zw&T@MS-$@C_jMvBGm9>NXie; zECs)9%)XLyFW|_B3002ovPDHLkU;%=bU%Dm$ diff --git a/src/Actors/Blobby/Blobby.tscn b/src/Actors/Blobby/Blobby.tscn index 7cb669c..33c8be5 100644 --- a/src/Actors/Blobby/Blobby.tscn +++ b/src/Actors/Blobby/Blobby.tscn @@ -4385,7 +4385,7 @@ texture = SubResource( 62 ) offset = Vector2( 1, 0 ) hframes = 6 vframes = 6 -frame = 8 +frame = 6 __meta__ = { "_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUJsb2JieVNwcml0ZS9CbG9iYnltYXRpb25QbGF5ZXIKc291cmNlfD1yZXM6Ly9hc3NldHMvYmxvYmJ5L2Jsb2JieS1zcHJpdGVzaGVldHQuYXNlcHJpdGUKbGF5ZXJ8PUJsb2JieQpvcF9leHB8PUZhbHNlCm9fZm9sZGVyfD0Kb19uYW1lfD0Kb25seV92aXNpYmxlfD1GYWxzZQpvX2V4X3B8PQo=" } @@ -4572,5 +4572,5 @@ one_shot = true [connection signal="got_grounded" from="BlobbyStateMachine" to="." method="_on_Blobby_got_grounded"] [connection signal="timeout" from="BlobbyStateMachine/JumpBufferTimer" to="BlobbyStateMachine" method="_on_JumpBufferTimer_timeout"] [connection signal="timeout" from="InvincibilityTimer" to="." method="_on_InvincibilityTimer_timeout"] -[connection signal="timeout" from="PitfallTimer" to="." method="_on_PitfallTimer_timeout"] [connection signal="timeout" from="PitfallTimer" to="." method="die_for_real" binds= [ -1 ]] +[connection signal="timeout" from="PitfallTimer" to="." method="_on_PitfallTimer_timeout"] diff --git a/src/Actors/Friendlies/WhatAreFrog.tscn b/src/Actors/Friendlies/WhatAreFrog.tscn index 930a021..7d70980 100644 --- a/src/Actors/Friendlies/WhatAreFrog.tscn +++ b/src/Actors/Friendlies/WhatAreFrog.tscn @@ -603,7 +603,6 @@ wait_time = 0.3 one_shot = true [node name="JumpCollisionBody" type="KinematicBody2D" parent="."] -visible = false collision_layer = 0 collision_mask = 8 diff --git a/src/Levels/Level 0.1.tscn b/src/Levels/Level 0.1.tscn index 2469086..d309603 100644 --- a/src/Levels/Level 0.1.tscn +++ b/src/Levels/Level 0.1.tscn @@ -1088,9 +1088,6 @@ unique_name_in_owner = true [node name="UserInterface" parent="." instance=ExtResource( 5 )] unique_name_in_owner = true -[node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] -wait_time = 20.0 - [node name="TransitionLayer" type="CanvasLayer" parent="."] visible = false diff --git a/src/Levels/Level 0.2.tscn b/src/Levels/Level 0.2.tscn index 1e09540..612dc48 100644 --- a/src/Levels/Level 0.2.tscn +++ b/src/Levels/Level 0.2.tscn @@ -1137,9 +1137,6 @@ size_flags_vertical = 3 [node name="UserInterface" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true -[node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] -wait_time = 20.0 - [node name="BlobbyCam" parent="." instance=ExtResource( 6 )] unique_name_in_owner = true drag_margin_top = 0.1 @@ -1151,7 +1148,7 @@ position = Vector2( -156, -51 ) scale = Vector2( 0.878906, 0.936025 ) [node name="BlobbySprite" parent="Blobby" index="5"] -frame = 5 +frame = 6 [node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"] parameters/playback = SubResource( 6 ) @@ -1185,6 +1182,7 @@ format = 1 [node name="ElevatorButton" parent="." instance=ExtResource( 11 )] position = Vector2( 1440, -64 ) +elevator_time = 5 [node name="Portal" parent="ElevatorButton" instance=ExtResource( 7 )] position = Vector2( 112, -8 ) diff --git a/src/Levels/Level 0.3.tscn b/src/Levels/Level 0.3.tscn index e5f1647..4ac26c6 100644 --- a/src/Levels/Level 0.3.tscn +++ b/src/Levels/Level 0.3.tscn @@ -227,9 +227,6 @@ size_flags_vertical = 3 [node name="UserInterface" parent="." instance=ExtResource( 7 )] unique_name_in_owner = true -[node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] -wait_time = 20.0 - [node name="BlobbyCam" parent="." instance=ExtResource( 13 )] unique_name_in_owner = true visible = false @@ -239,6 +236,9 @@ unique_name_in_owner = true position = Vector2( -180, 113 ) scale = Vector2( 0.878906, 0.936025 ) +[node name="BlobbySprite" parent="Blobby" index="5"] +frame = 7 + [node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"] parameters/playback = SubResource( 6 ) diff --git a/src/Levels/Level 0.4.tscn b/src/Levels/Level 0.4.tscn index d56222d..97616bf 100644 --- a/src/Levels/Level 0.4.tscn +++ b/src/Levels/Level 0.4.tscn @@ -116,9 +116,6 @@ size_flags_vertical = 3 [node name="UserInterface" parent="." instance=ExtResource( 13 )] unique_name_in_owner = true -[node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] -wait_time = 20.0 - [node name="BlobbyCam" parent="." instance=ExtResource( 5 )] unique_name_in_owner = true drag_margin_bottom = 0.3 @@ -128,6 +125,9 @@ unique_name_in_owner = true position = Vector2( -70, 1 ) scale = Vector2( 0.878906, 0.936025 ) +[node name="BlobbySprite" parent="Blobby" index="5"] +frame = 5 + [node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"] parameters/playback = SubResource( 6 ) diff --git a/src/Levels/Level 4.tscn b/src/Levels/Level 4.tscn index 6ae0851..a1ebbf4 100644 --- a/src/Levels/Level 4.tscn +++ b/src/Levels/Level 4.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=17 format=2] [ext_resource path="res://src/Environment/GreenHouseTiles.tres" type="TileSet" id=1] [ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=2] @@ -6,11 +6,9 @@ [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=4] [ext_resource path="res://src/Environment/DropThroughPlatforms.tres" type="TileSet" id=5] [ext_resource path="res://src/Utilities/SceneAudio.tscn" type="PackedScene" id=6] -[ext_resource path="res://src/Contraptions/Triggers/ElevatorButton.tscn" type="PackedScene" id=7] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=8] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Levels/Templates/LevelTemplate.gd" type="Script" id=10] -[ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=11] [ext_resource path="res://assets/environment/decor/platform-plants.png" type="Texture" id=12] [ext_resource path="res://src/Platforms/FlyingLaserCutter.tscn" type="PackedScene" id=13] [ext_resource path="res://src/ObstacleObjects/Mine.tscn" type="PackedScene" id=14] @@ -109,9 +107,6 @@ size_flags_vertical = 3 [node name="UserInterface" parent="." instance=ExtResource( 9 )] unique_name_in_owner = true -[node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] -wait_time = 20.0 - [node name="BlobbyCam" parent="." instance=ExtResource( 4 )] unique_name_in_owner = true drag_margin_bottom = 0.3 @@ -121,9 +116,6 @@ unique_name_in_owner = true position = Vector2( -180, 64 ) scale = Vector2( 0.878906, 0.936025 ) -[node name="BlobbySprite" parent="Blobby" index="5"] -frame = 5 - [node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"] parameters/playback = SubResource( 6 ) @@ -141,7 +133,7 @@ collision_layer = 8 collision_mask = 8 bake_navigation = true format = 1 -tile_data = PoolIntArray( -393230, 5, 65540, -393229, 5, 10, -393228, 5, 10, -393227, 5, 10, -393226, 5, 10, -393225, 5, 10, -393224, 5, 10, -393223, 5, 10, -393222, 5, 10, -393221, 5, 10, -393220, 5, 10, -393219, 5, 10, -393218, 5, 10, -393217, 5, 10, -458752, 5, 10, -458751, 5, 10, -458750, 5, 10, -458749, 5, 10, -458748, 5, 10, -458747, 5, 10, -458746, 5, 10, -458745, 5, 10, -458744, 5, 10, -458743, 5, 10, -458742, 5, 10, -458741, 5, 10, -458740, 5, 10, -458739, 5, 10, -458738, 5, 10, -458737, 5, 10, -458736, 5, 10, -458735, 5, 10, -458734, 5, 10, -458733, 5, 10, -458732, 5, 10, -458731, 5, 10, -458730, 5, 10, -458729, 5, 10, -458728, 5, 10, -458727, 5, 10, -458726, 5, 10, -458725, 5, 10, -458724, 5, 10, -458723, 5, 10, -458722, 5, 10, -458721, 5, 10, -458720, 5, 10, -458719, 5, 10, -458718, 5, 10, -458717, 5, 10, -458716, 5, 10, -458715, 5, 10, -458714, 5, 10, -458713, 5, 10, -458712, 5, 10, -458711, 5, 10, -458710, 5, 10, -458709, 5, 10, -458708, 5, 10, -458707, 5, 65541, -327694, 5, 7, -327693, 7, 0, -327692, 7, 0, -327691, 7, 0, -327690, 7, 0, -327689, 7, 0, -327688, 7, 0, -327687, 7, 0, -327686, 7, 0, -327685, 7, 0, -327684, 7, 0, -327683, 7, 0, -327682, 7, 0, -327681, 7, 0, -393216, 7, 0, -393215, 7, 0, -393214, 7, 0, -393213, 7, 0, -393212, 7, 0, -393211, 7, 0, -393210, 7, 0, -393209, 7, 0, -393208, 7, 0, -393207, 7, 0, -393206, 7, 0, -393205, 7, 0, -393204, 7, 0, -393203, 7, 0, -393202, 7, 0, -393201, 7, 0, -393200, 7, 0, -393199, 7, 0, -393198, 7, 0, -393184, 5, 3, -393183, 5, 3, -393171, 5, 6, -262158, 5, 7, -262157, 7, 0, -262156, 7, 0, -262155, 7, 0, -262154, 7, 0, -262153, 7, 0, -262152, 7, 0, -262151, 7, 0, -262150, 7, 0, -262149, 7, 0, -262148, 7, 0, -262147, 7, 0, -262146, 7, 0, -262145, 7, 0, -327680, 7, 0, -327679, 7, 0, -327678, 7, 0, -327677, 7, 0, -327676, 7, 0, -327675, 7, 0, -327674, 7, 0, -327673, 7, 0, -327672, 7, 0, -327671, 7, 0, -327670, 7, 0, -327669, 7, 0, -327668, 7, 0, -327667, 7, 0, -327666, 7, 0, -327665, 7, 0, -327664, 7, 0, -327663, 7, 0, -327662, 7, 0, -327648, 5, 3, -327647, 5, 3, -327635, 5, 6, -196622, 5, 7, -196621, 7, 0, -196620, 7, 0, -196619, 7, 0, -196618, 7, 0, -196617, 7, 0, -196616, 7, 0, -196615, 7, 0, -196614, 7, 0, -196613, 7, 0, -196612, 7, 0, -196611, 7, 0, -196610, 7, 0, -196609, 7, 0, -262144, 7, 0, -262143, 7, 0, -262142, 7, 0, -262141, 7, 0, -262140, 7, 0, -262139, 7, 0, -262138, 7, 0, -262137, 7, 0, -262136, 7, 0, -262135, 7, 0, -262134, 7, 0, -262133, 7, 0, -262132, 7, 0, -262131, 7, 0, -262130, 7, 0, -262129, 7, 0, -262128, 7, 0, -262127, 7, 0, -262126, 7, 0, -262112, 5, 3, -262111, 5, 3, -262099, 5, 6, -131086, 5, 7, -131085, 7, 0, -131084, 7, 0, -131083, 7, 0, -131082, 7, 0, -131081, 7, 0, -131080, 7, 0, -131079, 7, 0, -131078, 7, 0, -131077, 7, 0, -131076, 7, 0, -131075, 7, 0, -131074, 7, 0, -131073, 7, 0, -196608, 7, 0, -196607, 7, 0, -196606, 7, 0, -196605, 7, 0, -196604, 7, 0, -196603, 7, 0, -196602, 7, 0, -196601, 7, 0, -196600, 7, 0, -196599, 7, 0, -196598, 7, 0, -196597, 7, 0, -196596, 7, 0, -196595, 7, 0, -196594, 7, 0, -196593, 7, 0, -196592, 7, 0, -196591, 7, 0, -196590, 7, 0, -196576, 5, 3, -196575, 5, 3, -196563, 5, 6, -65550, 5, 7, -65549, 7, 0, -65548, 7, 0, -65547, 7, 0, -65546, 7, 0, -65545, 7, 0, -65544, 7, 0, -65543, 7, 0, -65542, 7, 0, -65541, 7, 0, -65540, 7, 0, -65539, 7, 0, -65538, 7, 0, -65537, 7, 0, -131072, 7, 0, -131071, 7, 0, -131070, 7, 0, -131069, 7, 0, -131068, 7, 0, -131067, 7, 0, -131066, 7, 0, -131065, 7, 0, -131064, 7, 0, -131063, 7, 0, -131062, 7, 0, -131061, 7, 0, -131060, 7, 0, -131059, 7, 0, -131058, 7, 0, -131057, 7, 0, -131056, 7, 0, -131055, 7, 0, -131054, 7, 0, -131040, 5, 3, -131039, 5, 3, -131027, 5, 6, -14, 5, 7, -13, 7, 0, -12, 7, 0, -11, 7, 0, -10, 7, 0, -9, 7, 0, -8, 7, 0, -7, 7, 0, -6, 7, 0, -5, 7, 0, -4, 7, 0, -3, 7, 0, -2, 7, 0, -1, 7, 0, -65536, 7, 0, -65535, 7, 0, -65534, 7, 0, -65533, 7, 0, -65532, 7, 0, -65531, 7, 0, -65530, 7, 0, -65529, 7, 0, -65528, 7, 0, -65527, 7, 0, -65526, 7, 0, -65525, 7, 0, -65524, 7, 0, -65523, 7, 0, -65522, 7, 0, -65521, 7, 0, -65520, 7, 0, -65519, 7, 0, -65518, 7, 0, -65504, 5, 3, -65503, 5, 3, -65491, 5, 6, 65520, 5, 7, 65521, 5, 10, 65522, 5, 10, 2, 7, 0, 3, 7, 0, 4, 7, 0, 5, 7, 0, 6, 7, 0, 7, 7, 0, 8, 7, 0, 9, 7, 0, 10, 7, 0, 11, 7, 0, 12, 7, 0, 13, 7, 0, 14, 7, 0, 15, 7, 0, 16, 7, 0, 17, 7, 0, 18, 7, 0, 26, 5, 1, 27, 5, 1, 28, 5, 1, 32, 5, 3, 33, 5, 3, 34, 5, 3, 37, 5, 3, 38, 5, 3, 39, 5, 3, 40, 5, 3, 41, 5, 3, 42, 5, 3, 43, 5, 3, 44, 5, 3, 45, 5, 6, 131056, 5, 7, 131059, 7, 0, 131060, 7, 0, 131061, 7, 0, 131062, 7, 0, 131063, 7, 0, 131064, 7, 0, 131065, 7, 0, 131066, 7, 0, 131067, 7, 0, 131068, 7, 0, 131069, 7, 0, 131070, 7, 0, 131071, 7, 0, 65536, 7, 0, 65537, 7, 0, 65538, 7, 0, 65539, 7, 0, 65540, 7, 0, 65541, 7, 0, 65542, 7, 0, 65543, 7, 0, 65544, 7, 0, 65545, 7, 0, 65546, 7, 0, 65547, 7, 0, 65548, 7, 0, 65549, 7, 0, 65550, 7, 0, 65551, 7, 0, 65552, 7, 0, 65553, 7, 0, 65554, 7, 0, 65562, 5, 1, 65563, 5, 1, 65564, 5, 1, 65568, 5, 3, 65569, 5, 3, 65570, 5, 3, 65573, 5, 3, 65574, 5, 3, 65575, 5, 3, 65576, 5, 3, 65577, 5, 3, 65578, 5, 3, 65579, 5, 3, 65580, 5, 3, 65581, 5, 6, 196592, 5, 7, 196595, 7, 0, 196596, 7, 0, 196597, 7, 0, 196598, 7, 0, 196599, 7, 0, 196600, 7, 0, 196601, 7, 0, 196602, 7, 0, 196603, 7, 0, 196604, 7, 0, 196605, 7, 0, 196606, 7, 0, 196607, 7, 0, 131072, 7, 0, 131073, 7, 0, 131074, 7, 0, 131075, 7, 0, 131076, 7, 0, 131077, 7, 0, 131078, 7, 0, 131079, 7, 0, 131080, 7, 0, 131081, 7, 0, 131082, 7, 0, 131083, 7, 0, 131084, 7, 0, 131085, 7, 0, 131086, 7, 0, 131087, 7, 0, 131088, 7, 0, 131089, 7, 0, 131090, 7, 0, 131098, 5, 1, 131099, 5, 1, 131100, 5, 1, 131117, 5, 6, 262128, 5, 7, 262131, 7, 0, 262132, 7, 0, 262133, 7, 0, 262134, 7, 0, 262135, 7, 0, 262137, 7, 0, 262138, 7, 0, 262139, 7, 0, 262140, 7, 0, 262141, 7, 0, 262142, 7, 0, 262143, 7, 0, 196608, 7, 0, 196609, 7, 0, 196610, 7, 0, 196611, 7, 0, 196612, 7, 0, 196613, 7, 0, 196614, 7, 0, 196615, 7, 0, 196616, 7, 0, 196617, 7, 0, 196618, 7, 0, 196619, 7, 0, 196620, 7, 0, 196621, 7, 0, 196622, 7, 0, 196623, 7, 0, 196624, 7, 0, 196625, 7, 0, 196626, 7, 0, 196634, 5, 1, 196635, 5, 1, 196636, 5, 1, 196653, 5, 6, 327664, 5, 7, 327667, 5, 65542, 327668, 5, 65543, 327669, 5, 65543, 327670, 5, 65544, 327671, 7, 0, 327672, 7, 0, 327673, 5, 65542, 327674, 5, 65544, 327677, 7, 0, 327678, 7, 0, 327679, 7, 0, 262144, 7, 0, 262145, 7, 0, 262146, 7, 0, 262147, 7, 0, 262148, 7, 0, 262149, 7, 0, 262150, 7, 0, 262151, 7, 0, 262152, 7, 0, 262153, 7, 0, 262154, 7, 0, 262155, 7, 0, 262156, 7, 0, 262157, 7, 0, 262158, 7, 0, 262159, 7, 0, 262160, 7, 0, 262161, 7, 0, 262162, 7, 0, 262170, 5, 1, 262171, 5, 1, 262172, 5, 1, 262173, 5, 3, 262174, 5, 3, 262175, 5, 3, 262176, 5, 3, 262177, 5, 3, 262178, 5, 3, 262179, 5, 3, 262180, 5, 3, 262181, 5, 3, 262182, 5, 3, 262183, 5, 3, 262184, 5, 3, 262185, 5, 3, 262186, 5, 3, 262187, 5, 3, 262188, 5, 3, 262189, 5, 6, 393200, 5, 7, 393203, 7, 0, 393204, 7, 0, 393205, 7, 0, 393206, 7, 0, 393207, 7, 0, 393208, 7, 0, 393209, 7, 0, 393210, 7, 0, 393211, 7, 0, 393212, 7, 0, 393213, 7, 0, 393214, 7, 0, 393215, 7, 0, 327680, 7, 0, 327681, 7, 0, 327682, 7, 0, 327683, 7, 0, 327684, 7, 0, 327685, 7, 0, 327686, 7, 0, 327687, 7, 0, 327688, 7, 0, 327689, 7, 0, 327690, 7, 0, 327691, 7, 0, 327692, 7, 0, 327693, 7, 0, 327694, 5, 1, 327695, 7, 0, 327696, 7, 0, 327697, 7, 0, 327698, 7, 0, 327706, 5, 1, 327707, 5, 1, 327708, 5, 1, 327709, 5, 3, 327710, 5, 3, 327711, 5, 3, 327712, 5, 3, 327713, 5, 3, 327714, 5, 3, 327715, 5, 3, 327716, 5, 3, 327717, 5, 3, 327718, 5, 3, 327719, 5, 3, 327720, 5, 3, 327721, 5, 3, 327722, 5, 3, 327723, 5, 3, 327724, 5, 3, 327725, 5, 6, 458736, 5, 7, 458739, 7, 0, 458740, 7, 0, 458741, 7, 0, 458742, 7, 0, 458743, 7, 0, 458744, 7, 0, 458745, 7, 0, 458746, 7, 0, 458747, 7, 0, 458748, 7, 0, 458749, 7, 0, 458750, 7, 0, 458751, 7, 0, 393216, 7, 0, 393217, 7, 0, 393218, 7, 0, 393219, 7, 0, 393220, 7, 0, 393221, 7, 0, 393222, 7, 0, 393223, 7, 0, 393224, 7, 0, 393225, 7, 0, 393226, 7, 0, 393227, 7, 0, 393228, 7, 0, 393229, 7, 0, 393230, 5, 1, 393231, 7, 0, 393232, 7, 0, 393233, 7, 0, 393234, 7, 0, 393242, 5, 1, 393243, 5, 1, 393244, 5, 1, 393245, 5, 3, 393246, 5, 3, 393247, 5, 3, 393248, 5, 3, 393249, 5, 3, 393250, 5, 3, 393251, 5, 3, 393252, 5, 3, 393253, 5, 3, 393254, 5, 3, 393255, 5, 3, 393256, 5, 3, 393257, 5, 3, 393258, 5, 3, 393259, 5, 3, 393260, 5, 3, 393261, 5, 6, 524272, 5, 3, 524273, 5, 3, 524274, 5, 3, 524275, 5, 2, 524276, 5, 2, 524277, 5, 2, 524278, 5, 2, 524279, 5, 2, 524280, 5, 2, 524281, 5, 2, 524282, 5, 2, 524283, 5, 2, 524284, 5, 2, 524285, 5, 2, 524286, 5, 2, 524287, 5, 2, 458752, 5, 2, 458753, 5, 2, 458754, 5, 2, 458755, 5, 2, 458756, 5, 2, 458757, 5, 2, 458758, 5, 2, 458759, 5, 2, 458760, 5, 2, 458761, 5, 2, 458762, 5, 2, 458763, 5, 2, 458764, 5, 2, 458765, 5, 2, 458766, 5, 2, 458767, 5, 2, 458768, 5, 2, 458769, 5, 2, 458770, 5, 2, 458771, 5, 2, 458772, 5, 2, 458773, 5, 2, 458774, 5, 2, 458775, 5, 2, 458776, 5, 2, 458777, 5, 2, 458778, 5, 2, 458779, 5, 2, 458780, 5, 2, 458781, 5, 2, 458782, 5, 2, 458783, 5, 2, 458784, 5, 2, 458785, 5, 2, 458786, 5, 2, 458787, 5, 2, 458788, 5, 2, 458789, 5, 2, 458790, 5, 2, 458791, 5, 2, 458792, 5, 2, 458793, 5, 2, 458794, 5, 2, 458795, 5, 2, 458796, 5, 2, 458797, 5, 65539 ) +tile_data = PoolIntArray( -393232, 5, 65540, -393231, 5, 10, -393230, 5, 10, -393229, 5, 10, -393228, 5, 10, -393227, 5, 10, -393226, 5, 10, -393225, 5, 10, -393224, 5, 10, -393223, 5, 10, -393222, 5, 10, -393221, 5, 10, -393220, 5, 10, -393219, 5, 10, -393218, 5, 10, -393217, 5, 10, -458752, 5, 10, -458751, 5, 10, -458750, 5, 10, -458749, 5, 10, -458748, 5, 10, -458747, 5, 10, -458746, 5, 10, -458745, 5, 10, -458744, 5, 10, -458743, 5, 10, -458742, 5, 10, -458741, 5, 10, -458740, 5, 10, -458739, 5, 10, -458738, 5, 10, -458737, 5, 10, -458736, 5, 10, -458735, 5, 10, -458734, 5, 10, -458733, 5, 10, -458732, 5, 10, -458731, 5, 10, -458730, 5, 10, -458729, 5, 10, -458728, 5, 10, -458727, 5, 10, -458726, 5, 10, -458725, 5, 10, -458724, 5, 10, -458723, 5, 10, -458722, 5, 10, -458721, 5, 10, -458720, 5, 10, -458719, 5, 10, -458718, 5, 10, -458717, 5, 10, -458716, 5, 10, -458715, 5, 10, -458714, 5, 10, -458713, 5, 10, -458712, 5, 10, -458711, 5, 10, -458710, 5, 10, -458709, 5, 10, -458708, 5, 10, -458707, 5, 65541, -327696, 5, 7, -327692, 7, 0, -327691, 7, 0, -327690, 7, 0, -327689, 7, 0, -327688, 7, 0, -327687, 7, 0, -327686, 7, 0, -327685, 7, 0, -327684, 7, 0, -327683, 7, 0, -327682, 7, 0, -327681, 7, 0, -393216, 7, 0, -393215, 7, 0, -393214, 7, 0, -393213, 7, 0, -393212, 7, 0, -393211, 7, 0, -393210, 7, 0, -393209, 7, 0, -393208, 7, 0, -393207, 7, 0, -393206, 7, 0, -393205, 7, 0, -393204, 7, 0, -393203, 7, 0, -393202, 7, 0, -393201, 7, 0, -393200, 7, 0, -393199, 7, 0, -393198, 7, 0, -393184, 5, 3, -393183, 5, 3, -393171, 5, 6, -262160, 5, 7, -262156, 7, 0, -262155, 7, 0, -262154, 7, 0, -262153, 7, 0, -262152, 7, 0, -262151, 7, 0, -262150, 7, 0, -262149, 7, 0, -262148, 7, 0, -262147, 7, 0, -262146, 7, 0, -262145, 7, 0, -327680, 7, 0, -327679, 7, 0, -327678, 7, 0, -327677, 7, 0, -327676, 7, 0, -327675, 7, 0, -327674, 7, 0, -327673, 7, 0, -327672, 7, 0, -327671, 7, 0, -327670, 7, 0, -327669, 7, 0, -327668, 7, 0, -327667, 7, 0, -327666, 7, 0, -327665, 7, 0, -327664, 7, 0, -327663, 7, 0, -327662, 7, 0, -327648, 5, 3, -327647, 5, 3, -327635, 5, 6, -196624, 5, 7, -196620, 7, 0, -196619, 7, 0, -196618, 7, 0, -196617, 7, 0, -196616, 7, 0, -196615, 7, 0, -196614, 7, 0, -196613, 7, 0, -196612, 7, 0, -196611, 7, 0, -196610, 7, 0, -196609, 7, 0, -262144, 7, 0, -262143, 7, 0, -262142, 7, 0, -262141, 7, 0, -262140, 7, 0, -262139, 7, 0, -262138, 7, 0, -262137, 7, 0, -262136, 7, 0, -262135, 7, 0, -262134, 7, 0, -262133, 7, 0, -262132, 7, 0, -262131, 7, 0, -262130, 7, 0, -262129, 7, 0, -262128, 7, 0, -262127, 7, 0, -262126, 7, 0, -262112, 5, 3, -262111, 5, 3, -262099, 5, 6, -131088, 5, 7, -131085, 7, 0, -131084, 7, 0, -131083, 7, 0, -131082, 7, 0, -131081, 7, 0, -131080, 7, 0, -131079, 7, 0, -131078, 7, 0, -131077, 7, 0, -131076, 7, 0, -131075, 7, 0, -131074, 7, 0, -131073, 7, 0, -196608, 7, 0, -196607, 7, 0, -196606, 7, 0, -196605, 7, 0, -196604, 7, 0, -196603, 7, 0, -196602, 7, 0, -196601, 7, 0, -196600, 7, 0, -196599, 7, 0, -196598, 7, 0, -196597, 7, 0, -196596, 7, 0, -196595, 7, 0, -196594, 7, 0, -196593, 7, 0, -196592, 7, 0, -196591, 7, 0, -196590, 7, 0, -196576, 5, 3, -196575, 5, 3, -196563, 5, 6, -65552, 5, 7, -65549, 7, 0, -65548, 7, 0, -65547, 7, 0, -65546, 7, 0, -65545, 7, 0, -65544, 7, 0, -65543, 7, 0, -65542, 7, 0, -65541, 7, 0, -65540, 7, 0, -65539, 7, 0, -65538, 7, 0, -65537, 7, 0, -131072, 7, 0, -131071, 7, 0, -131070, 7, 0, -131069, 7, 0, -131068, 7, 0, -131067, 7, 0, -131066, 7, 0, -131065, 7, 0, -131064, 7, 0, -131063, 7, 0, -131062, 7, 0, -131061, 7, 0, -131060, 7, 0, -131059, 7, 0, -131058, 7, 0, -131057, 7, 0, -131056, 7, 0, -131055, 7, 0, -131054, 7, 0, -131040, 5, 3, -131039, 5, 3, -131027, 5, 6, -16, 5, 7, -13, 7, 0, -12, 7, 0, -11, 7, 0, -10, 7, 0, -9, 7, 0, -8, 7, 0, -7, 7, 0, -6, 7, 0, -5, 7, 0, -4, 7, 0, -3, 7, 0, -2, 7, 0, -1, 7, 0, -65536, 7, 0, -65535, 7, 0, -65534, 7, 0, -65533, 7, 0, -65532, 7, 0, -65531, 7, 0, -65530, 7, 0, -65529, 7, 0, -65528, 7, 0, -65527, 7, 0, -65526, 7, 0, -65525, 7, 0, -65524, 7, 0, -65523, 7, 0, -65522, 7, 0, -65521, 7, 0, -65520, 7, 0, -65519, 7, 0, -65518, 7, 0, -65504, 5, 3, -65503, 5, 3, -65491, 5, 6, 65520, 5, 7, 2, 7, 0, 3, 7, 0, 4, 7, 0, 5, 7, 0, 6, 7, 0, 7, 7, 0, 8, 7, 0, 9, 7, 0, 10, 7, 0, 11, 7, 0, 12, 7, 0, 13, 7, 0, 14, 7, 0, 15, 7, 0, 16, 7, 0, 17, 7, 0, 18, 7, 0, 26, 5, 1, 27, 5, 1, 28, 5, 1, 32, 5, 3, 33, 5, 3, 34, 5, 3, 37, 5, 3, 38, 5, 3, 39, 5, 3, 40, 5, 3, 41, 5, 3, 42, 5, 3, 43, 5, 3, 44, 5, 3, 45, 5, 6, 131056, 5, 7, 131059, 7, 0, 131060, 7, 0, 131061, 7, 0, 131062, 7, 0, 131063, 7, 0, 131064, 7, 0, 131065, 7, 0, 131066, 7, 0, 131067, 7, 0, 131068, 7, 0, 131069, 7, 0, 131070, 7, 0, 131071, 7, 0, 65536, 7, 0, 65537, 7, 0, 65538, 7, 0, 65539, 7, 0, 65540, 7, 0, 65541, 7, 0, 65542, 7, 0, 65543, 7, 0, 65544, 7, 0, 65545, 7, 0, 65546, 7, 0, 65547, 7, 0, 65548, 7, 0, 65549, 7, 0, 65550, 7, 0, 65551, 7, 0, 65552, 7, 0, 65553, 7, 0, 65554, 7, 0, 65562, 5, 1, 65563, 5, 1, 65564, 5, 1, 65568, 5, 3, 65569, 5, 3, 65570, 5, 3, 65573, 5, 3, 65574, 5, 3, 65575, 5, 3, 65576, 5, 3, 65577, 5, 3, 65578, 5, 3, 65579, 5, 3, 65580, 5, 3, 65581, 5, 6, 196592, 5, 7, 196595, 7, 0, 196596, 7, 0, 196597, 7, 0, 196598, 7, 0, 196599, 7, 0, 196600, 7, 0, 196601, 7, 0, 196602, 7, 0, 196603, 7, 0, 196604, 7, 0, 196605, 7, 0, 196606, 7, 0, 196607, 7, 0, 131072, 7, 0, 131073, 7, 0, 131074, 7, 0, 131075, 7, 0, 131076, 7, 0, 131077, 7, 0, 131078, 7, 0, 131079, 7, 0, 131080, 7, 0, 131081, 7, 0, 131082, 7, 0, 131083, 7, 0, 131084, 7, 0, 131085, 7, 0, 131086, 7, 0, 131087, 7, 0, 131088, 7, 0, 131089, 7, 0, 131090, 7, 0, 131098, 5, 1, 131099, 5, 1, 131100, 5, 1, 131117, 5, 6, 262128, 5, 7, 262131, 7, 0, 262132, 7, 0, 262133, 7, 0, 262134, 7, 0, 262135, 7, 0, 262137, 7, 0, 262138, 7, 0, 262139, 7, 0, 262140, 7, 0, 262141, 7, 0, 262142, 7, 0, 262143, 7, 0, 196608, 7, 0, 196609, 7, 0, 196610, 7, 0, 196611, 7, 0, 196612, 7, 0, 196613, 7, 0, 196614, 7, 0, 196615, 7, 0, 196616, 7, 0, 196617, 7, 0, 196618, 7, 0, 196619, 7, 0, 196620, 7, 0, 196621, 7, 0, 196622, 7, 0, 196623, 7, 0, 196624, 7, 0, 196625, 7, 0, 196626, 7, 0, 196634, 5, 1, 196635, 5, 1, 196636, 5, 1, 196653, 5, 6, 327664, 5, 7, 327667, 5, 65542, 327668, 5, 65543, 327669, 5, 65543, 327670, 5, 65544, 327671, 7, 0, 327672, 7, 0, 327673, 5, 65542, 327674, 5, 65544, 327677, 7, 0, 327678, 7, 0, 327679, 7, 0, 262144, 7, 0, 262145, 7, 0, 262146, 7, 0, 262147, 7, 0, 262148, 7, 0, 262149, 7, 0, 262150, 7, 0, 262151, 7, 0, 262152, 7, 0, 262153, 7, 0, 262154, 7, 0, 262155, 7, 0, 262156, 7, 0, 262157, 7, 0, 262158, 7, 0, 262159, 7, 0, 262160, 7, 0, 262161, 7, 0, 262162, 7, 0, 262170, 5, 1, 262171, 5, 1, 262172, 5, 1, 262173, 5, 3, 262174, 5, 3, 262175, 5, 3, 262176, 5, 3, 262177, 5, 3, 262178, 5, 3, 262179, 5, 3, 262180, 5, 3, 262181, 5, 3, 262182, 5, 3, 262183, 5, 3, 262184, 5, 3, 262185, 5, 3, 262186, 5, 3, 262187, 5, 3, 262188, 5, 3, 262189, 5, 6, 393200, 5, 7, 393203, 7, 0, 393204, 7, 0, 393205, 7, 0, 393206, 7, 0, 393207, 7, 0, 393208, 7, 0, 393209, 7, 0, 393210, 7, 0, 393211, 7, 0, 393212, 7, 0, 393213, 7, 0, 393214, 7, 0, 393215, 7, 0, 327680, 7, 0, 327681, 7, 0, 327682, 7, 0, 327683, 7, 0, 327684, 7, 0, 327685, 7, 0, 327686, 7, 0, 327687, 7, 0, 327688, 7, 0, 327689, 7, 0, 327690, 7, 0, 327691, 7, 0, 327692, 7, 0, 327693, 7, 0, 327694, 5, 1, 327695, 7, 0, 327696, 7, 0, 327697, 7, 0, 327698, 7, 0, 327706, 5, 1, 327707, 5, 1, 327708, 5, 1, 327709, 5, 3, 327710, 5, 3, 327711, 5, 3, 327712, 5, 3, 327713, 5, 3, 327714, 5, 3, 327715, 5, 3, 327716, 5, 3, 327717, 5, 3, 327718, 5, 3, 327719, 5, 3, 327720, 5, 3, 327721, 5, 3, 327722, 5, 3, 327723, 5, 3, 327724, 5, 3, 327725, 5, 6, 458736, 5, 7, 458739, 7, 0, 458740, 7, 0, 458741, 7, 0, 458742, 7, 0, 458743, 7, 0, 458744, 7, 0, 458745, 7, 0, 458746, 7, 0, 458747, 7, 0, 458748, 7, 0, 458749, 7, 0, 458750, 7, 0, 458751, 7, 0, 393216, 7, 0, 393217, 7, 0, 393218, 7, 0, 393219, 7, 0, 393220, 7, 0, 393221, 7, 0, 393222, 7, 0, 393223, 7, 0, 393224, 7, 0, 393225, 7, 0, 393226, 7, 0, 393227, 7, 0, 393228, 7, 0, 393229, 7, 0, 393230, 5, 1, 393231, 7, 0, 393232, 7, 0, 393233, 7, 0, 393234, 7, 0, 393242, 5, 1, 393243, 5, 1, 393244, 5, 1, 393245, 5, 3, 393246, 5, 3, 393247, 5, 3, 393248, 5, 3, 393249, 5, 3, 393250, 5, 3, 393251, 5, 3, 393252, 5, 3, 393253, 5, 3, 393254, 5, 3, 393255, 5, 3, 393256, 5, 3, 393257, 5, 3, 393258, 5, 3, 393259, 5, 3, 393260, 5, 3, 393261, 5, 6, 524272, 5, 65538, 524273, 5, 3, 524274, 5, 3, 524275, 5, 2, 524276, 5, 2, 524277, 5, 2, 524278, 5, 2, 524279, 5, 2, 524280, 5, 2, 524281, 5, 2, 524282, 5, 2, 524283, 5, 2, 524284, 5, 2, 524285, 5, 2, 524286, 5, 2, 524287, 5, 2, 458752, 5, 2, 458753, 5, 2, 458754, 5, 2, 458755, 5, 2, 458756, 5, 2, 458757, 5, 2, 458758, 5, 2, 458759, 5, 2, 458760, 5, 2, 458761, 5, 2, 458762, 5, 2, 458763, 5, 2, 458764, 5, 2, 458765, 5, 2, 458766, 5, 2, 458767, 5, 2, 458768, 5, 2, 458769, 5, 2, 458770, 5, 2, 458771, 5, 2, 458772, 5, 2, 458773, 5, 2, 458774, 5, 2, 458775, 5, 2, 458776, 5, 2, 458777, 5, 2, 458778, 5, 2, 458779, 5, 2, 458780, 5, 2, 458781, 5, 2, 458782, 5, 2, 458783, 5, 2, 458784, 5, 2, 458785, 5, 2, 458786, 5, 2, 458787, 5, 2, 458788, 5, 2, 458789, 5, 2, 458790, 5, 2, 458791, 5, 2, 458792, 5, 2, 458793, 5, 2, 458794, 5, 2, 458795, 5, 2, 458796, 5, 2, 458797, 5, 65539 ) [node name="DropThroughPlatforms" type="TileMap" parent="."] tile_set = ExtResource( 5 ) @@ -155,19 +147,9 @@ tile_set = SubResource( 5 ) cell_size = Vector2( 16, 16 ) format = 1 -[node name="ElevatorButton" parent="." instance=ExtResource( 7 )] -position = Vector2( -32, 108 ) -elevator_time = 10 - -[node name="Portal" parent="ElevatorButton" instance=ExtResource( 11 )] -position = Vector2( 36, -8 ) -scale = Vector2( 0.5, 0.5 ) -next_scene = "res://src/Levels/Actual Level 1.tscn" - [node name="FlyingLaserCutter" parent="." instance=ExtResource( 13 )] position = Vector2( -128, 96 ) rotation = -1.57079 -scale = Vector2( 1, 1.00162 ) avoid_crushing = true [node name="FlyingLaserCutter2" parent="." instance=ExtResource( 13 )] diff --git a/src/Platforms/FlyingLaserCutter.gd b/src/Platforms/FlyingLaserCutter.gd index 8f1ba9d..f9559a0 100644 --- a/src/Platforms/FlyingLaserCutter.gd +++ b/src/Platforms/FlyingLaserCutter.gd @@ -3,6 +3,7 @@ const PhysicsFunc = preload("res://src/Utilities/Physic/PhysicsFunc.gd") #Array of RayCast2D onready var trigger_rays = $FlyingLaserCutterBody/Triggers.get_children() +onready var trigger_ray_textures = $FlyingLaserCutterBody/TriggerTextures.get_children() onready var body = $FlyingLaserCutterBody onready var local_facing: Vector2 = Vector2.RIGHT onready var global_facing: Vector2 = local_facing.rotated(transform.get_rotation()) @@ -11,6 +12,9 @@ onready var slide_friction = 1.5 var flyoff_triggered = false var has_hit_player = false var halted = false +var returning = false +var initial_distance : float = 1.0 + export(float) var velocity = 1 export(float) var max_velocity = 200 export(float) var acceleration_force = 1200 @@ -18,39 +22,51 @@ export(float) var mass = 10 export(bool) var avoid_crushing = false export(bool) var fast_retrigger = false -# TODO Returing Laser cutter has broken collision and infinite inertia -# Maybe keep returning paths free and crush player when in the way func _ready() -> void: $FlyingLaserCutterBody/Sprite/AnimationPlayer.play("default") +func _process(delta: float) -> void: + update_trigger_ray_shader() func _physics_process(delta: float) -> void: if !flyoff_triggered: for ray in trigger_rays: + # When player has been hit on the way if (has_hit_player && body.position.x > 0): break + if ray.is_colliding() && (body.position.x < 1 || fast_retrigger): var collider = ray.get_collider() if collider.is_in_group("player"): flyoff_triggered = true body.set("motion/sync_to_physics", false) break + if body.position.x > 0: if halted && avoid_crushing: return + returning = true velocity=1 body.position.x += (max_velocity/3)*-1*delta + + else: + returning = false + elif body.position.x == 0: has_hit_player = false + if flyoff_triggered: + returning = false velocity = PhysicsFunc.two_step_euler( velocity, acceleration_force, mass, delta ) velocity = clamp(velocity, 0, max_velocity) + var collision = body.move_and_collide(velocity*global_facing*delta,true) + if collision != null: if !collision.collider.is_in_group("player"): body.set("motion/sync_to_physics", true) @@ -58,6 +74,30 @@ func _physics_process(delta: float) -> void: has_hit_player = true flyoff_triggered = false +func update_trigger_ray_shader() -> void: + for i in trigger_rays.size(): + var raycast: RayCast2D = trigger_rays[i] + var ray_texture: Sprite = trigger_ray_textures[i] + var distance: float = (raycast.position + body.position).distance_to(to_local(raycast.get_collision_point())) + ray_texture.material.set_shader_param("total_distance", distance) + if initial_distance <= 1.0: + initial_distance = distance + if flyoff_triggered || returning: + var factor : float = distance/initial_distance + ray_texture.material.set_shader_param("wave1", 0) + ray_texture.material.set_shader_param("wave2", 0) + ray_texture.material.set_shader_param("wave3", 1) + var constant_ray_color: Color = ray_texture.material.get_shader_param("wave3_color") + constant_ray_color.a = 1.2 - 1.0 * factor + ray_texture.material.set_shader_param("wave3_color", constant_ray_color) + else: + ray_texture.material.set_shader_param("wave1", 1) + ray_texture.material.set_shader_param("wave2", 0) + ray_texture.material.set_shader_param("wave3", 0) + var constant_ray_color: Color = ray_texture.material.get_shader_param("wave3_color") + constant_ray_color.a = 0.01 + ray_texture.material.set_shader_param("wave3_color", constant_ray_color) + func _on_BackArea_body_entered(body: Node) -> void: if(body.is_in_group("player")): diff --git a/src/Platforms/FlyingLaserCutter.tscn b/src/Platforms/FlyingLaserCutter.tscn index 010cca4..3000f63 100644 --- a/src/Platforms/FlyingLaserCutter.tscn +++ b/src/Platforms/FlyingLaserCutter.tscn @@ -1,7 +1,9 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=11 format=2] [ext_resource path="res://assets/contraption/FlyingLaserCutterShaded.png" type="Texture" id=1] [ext_resource path="res://src/Platforms/FlyingLaserCutter.gd" type="Script" id=2] +[ext_resource path="res://src/Platforms/FlyingLaserCutterTriggerRayShader.gshader.gdshader" type="Shader" id=3] +[ext_resource path="res://assets/Sprite-0001.png" type="Texture" id=4] [sub_resource type="Animation" id=2] length = 2.4 @@ -28,10 +30,51 @@ extents = Vector2( 3.067, 10 ) [sub_resource type="RectangleShape2D" id=5] extents = Vector2( 0.5, 11 ) +[sub_resource type="ShaderMaterial" id=6] +resource_local_to_scene = true +shader = ExtResource( 3 ) +shader_param/bits = 1.0 +shader_param/pixel_offset = 0.0 +shader_param/total_distance = 100.0 +shader_param/wave1 = 1.0 +shader_param/wave2 = 0.0 +shader_param/wave3 = 0.0 +shader_param/wave1_color = Color( 1, 1, 1, 0.764706 ) +shader_param/wave2_color = Color( 0.945098, 0.392157, 0.121569, 0.141176 ) +shader_param/wave3_color = Color( 0.945098, 0.392157, 0.121569, 1 ) +shader_param/wave_frequency = 0.231 +shader_param/wave_amplitude = 0.041 +shader_param/wave_offset = 0.5 +shader_param/traveling = 1.0 +shader_param/travel_speed = -0.618 +shader_param/oscilating = 1.0 +shader_param/oscilation_speed = 0.2 + +[sub_resource type="ShaderMaterial" id=7] +resource_local_to_scene = true +shader = ExtResource( 3 ) +shader_param/bits = 1.0 +shader_param/pixel_offset = 0.0 +shader_param/total_distance = 100.0 +shader_param/wave1 = 1.0 +shader_param/wave2 = 0.0 +shader_param/wave3 = 0.0 +shader_param/wave1_color = Color( 1, 1, 1, 0.764706 ) +shader_param/wave2_color = Color( 0.945098, 0.392157, 0.121569, 0.176471 ) +shader_param/wave3_color = Color( 0.945098, 0.392157, 0.121569, 1 ) +shader_param/wave_frequency = 0.231 +shader_param/wave_amplitude = 0.041 +shader_param/wave_offset = 0.5 +shader_param/traveling = 1.0 +shader_param/travel_speed = -0.618 +shader_param/oscilating = 1.0 +shader_param/oscilation_speed = 0.2 + [node name="FlyingLaserCutter" type="Node2D"] script = ExtResource( 2 ) [node name="FlyingLaserCutterBody" type="KinematicBody2D" parent="."] +position = Vector2( 4, 0 ) collision_layer = 32 collision_mask = 57 collision/safe_margin = 0.001 @@ -41,7 +84,7 @@ motion/sync_to_physics = true texture = ExtResource( 1 ) hframes = 5 vframes = 5 -frame = 21 +frame = 4 __meta__ = { "_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUZseWluZ0xhc2VyQ3V0dGVyQm9keS9TcHJpdGUvQW5pbWF0aW9uUGxheWVyCnNvdXJjZXw9cmVzOi8vYXNzZXRzL2NvbnRyYXB0aW9uL0ZseWluZ0xhc2VyQ3V0dGVyLmFzZXByaXRlCmxheWVyfD0Kb3BfZXhwfD1GYWxzZQpvX2ZvbGRlcnw9Cm9fbmFtZXw9Cm9ubHlfdmlzaWJsZXw9RmFsc2UKb19leF9wfD0K" } @@ -75,24 +118,42 @@ position = Vector2( -1, 0 ) shape = SubResource( 5 ) [node name="Triggers" type="Node2D" parent="FlyingLaserCutterBody"] -visible = false position = Vector2( 0, 0.0077219 ) [node name="RayCast2D" type="RayCast2D" parent="FlyingLaserCutterBody/Triggers"] -position = Vector2( 3.92072e-12, 8.99337 ) +position = Vector2( 9, 9 ) rotation = -1.5708 -scale = Vector2( 1, 1000 ) +scale = Vector2( 1, 5000 ) enabled = true cast_to = Vector2( 0, 1 ) collision_mask = 9 [node name="RayCast2D2" type="RayCast2D" parent="FlyingLaserCutterBody/Triggers"] -position = Vector2( 0, -8.95621 ) +position = Vector2( 9, -9 ) rotation = -1.5708 -scale = Vector2( 1, 1000 ) +scale = Vector2( 1, 5000 ) enabled = true cast_to = Vector2( 0, 1 ) collision_mask = 9 +[node name="TriggerTextures" type="Node2D" parent="FlyingLaserCutterBody"] +z_index = -1 + +[node name="Texture" type="Sprite" parent="FlyingLaserCutterBody/TriggerTextures"] +material = SubResource( 6 ) +position = Vector2( 82, 15 ) +scale = Vector2( 1, -1 ) +texture = ExtResource( 4 ) +offset = Vector2( 2430, 4 ) +region_rect = Rect2( 2106.25, 268.196, 8.5918, 0 ) + +[node name="Texture2" type="Sprite" parent="FlyingLaserCutterBody/TriggerTextures"] +material = SubResource( 7 ) +position = Vector2( 82, -6 ) +scale = Vector2( 1, -1 ) +texture = ExtResource( 4 ) +offset = Vector2( 2430, 4 ) +region_rect = Rect2( 2106.25, 268.196, 8.5918, 0 ) + [connection signal="body_entered" from="FlyingLaserCutterBody/BackArea" to="." method="_on_BackArea_body_entered"] [connection signal="body_exited" from="FlyingLaserCutterBody/BackArea" to="." method="_on_BackArea_body_exited"] diff --git a/src/Platforms/FlyingLaserCutterTriggerRayShader.gshader.gdshader b/src/Platforms/FlyingLaserCutterTriggerRayShader.gshader.gdshader new file mode 100644 index 0000000..6873358 --- /dev/null +++ b/src/Platforms/FlyingLaserCutterTriggerRayShader.gshader.gdshader @@ -0,0 +1,59 @@ +shader_type canvas_item; + +const float PI = 3.14159; + +uniform float bits = 1.; +uniform float pixel_offset = 0.5; + +uniform float total_distance = 50.; + +uniform float wave1 :hint_range(0.0, 1.0, 1.) = 1.; +uniform float wave2 :hint_range(0.0, 1.0, 1.) = 1.; +uniform float wave3 :hint_range(0.0, 1.0, 1.) = 1.; + +uniform vec4 wave1_color : hint_color = vec4(0.0,1.0,0.0,1.); +uniform vec4 wave2_color : hint_color = vec4(0.0,1.0,0.0,1.); +uniform vec4 wave3_color : hint_color = vec4(1.,1.,1.,1.); + +uniform float wave_frequency: hint_range(0.0, 10.) = 0.2; +uniform float wave_amplitude: hint_range(0., 1.) = 0.3; +uniform float wave_offset: hint_range(-1., 1.) = 0.5; + +uniform float traveling : hint_range(0.,1., 1.) = 1.; +uniform float travel_speed : hint_range(-100., 100.) = 0.618; + +uniform float oscilating : hint_range(0.,1., 1.) = 1.; +uniform float oscilation_speed : hint_range(-100., 100.) = 0.618; + +float plot(vec2 st, float pct) { + return smoothstep(pct - 0.03, pct, st.y) - + smoothstep(pct, pct + 0.03, st.y); +} + +void fragment() { + // Adapt the size of pixel regions to the size of the texture + float x_bits = bits / TEXTURE_PIXEL_SIZE.x; + float y_bits = bits / TEXTURE_PIXEL_SIZE.y; + // Segment the UV into pixels + float pixelized_x = floor(UV.x * x_bits)/x_bits + pixel_offset/x_bits; + float pixelized_y = floor(UV.y * y_bits)/y_bits + pixel_offset/y_bits; + vec2 pixel_coord = vec2(pixelized_x, pixelized_y); + + float freq = wave_frequency / TEXTURE_PIXEL_SIZE.x; + + float travel_summand = (TIME * traveling * travel_speed); + float oscilation_factor = (sin(TIME) * oscilating * oscilation_speed); + + float y1 = sin(pixel_coord.x * freq + travel_summand) * (wave_amplitude/2. + wave_amplitude/2. * oscilation_factor) + wave_offset; + float y2 = -1. * sin(pixel_coord.x * freq + travel_summand) * (wave_amplitude/2. + wave_amplitude/2. * oscilation_factor) + wave_offset; + float y3 = 0. + wave_offset; + float point1 = (plot(pixel_coord, y1)); + float point2 = (plot(pixel_coord, y2)); + float point3 = (plot(pixel_coord, y3)); + vec4 c = point1 * wave1 * wave1_color + point2 * wave2 * wave2_color + point3 * wave3 * wave3_color; + + vec2 texture_coord = UV.xy / (TEXTURE_PIXEL_SIZE.xy); + float dist = max(sign(total_distance - texture_coord.x), 0.); + + COLOR = c * dist; +} \ No newline at end of file diff --git a/src/Platforms/FlyingLaserCutterTriggerRayShader.tres b/src/Platforms/FlyingLaserCutterTriggerRayShader.tres new file mode 100644 index 0000000..365b8bc --- /dev/null +++ b/src/Platforms/FlyingLaserCutterTriggerRayShader.tres @@ -0,0 +1,141 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=2] + +[sub_resource type="Shader" id=1] +code = "/* +Shader from Godot Shaders - the free shader library. +godotshaders.com/shader/energy-beams + +This shader is under CC0 license. Feel free to use, improve and +change this shader according to your needs and consider sharing +the modified result to godotshaders.com. +*/ + +shader_type canvas_item; +render_mode blend_add; // Remove this if you want to use HDR glow instead (use \"Glow\" and \"Outline Glow\" sliders) + +uniform int beams = 2; // How many beams the energy field should have + +uniform float energy = 3.0; // How much the beams will travel up and down +uniform int roughness : hint_range(1, 10) = 3; // How compact the noise texture will be +uniform int frequency = 10; // Amount of \"ripples\" in the beams + +uniform float speed = 1.0; // Animation speed +uniform float thickness : hint_range(0.0, 0.1) = 0.006; // Thickness of the main beam +uniform float outline_thickness : hint_range(0.0, 0.1) = 0.03; //Thickness of the outline color +uniform float beam_difference : hint_range(0.0, 1.0) = 0.0; // The thickness difference between the main beam and the other, if there are more than one beam. The closer to 1 the smaller the thickness difference. + +uniform float glow : hint_range(0.0, 3.0) = 0.0; // Use together with WorldEnvironment's Glow feature +uniform float outline_glow : hint_range(0.0, 3.0) = 0.0; + +uniform vec4 color : hint_color = vec4(0.91, 1.0, 1.0, 1.0); +uniform vec4 outline_color : hint_color = vec4(0.5, 1.0, 0.96, 1.0); + +uniform float progress : hint_range(0.0, 1.0) = 1.0; + +uniform float dist = 50.; + +uniform float y_offset : hint_range (-0.5, 0.5) = 0.0; // Position of the beam +uniform float fixed_edge_size : hint_range(0.0, 0.5) = 0.05; // How close to the edge should the beam be still before the animatino starts +uniform vec2 noise_scale = vec2(1.0); // If the object (for example the ColorRect or Sprite node) is compressed use this to compensate for the noise texture being compressed. + +float random(vec2 uv) { + return fract(sin(dot(uv.xy, + vec2(12.9898,78.233))) * + 43758.5453123); +} + +float noise(vec2 uv) { + vec2 uv_index = floor(uv); + vec2 uv_fract = fract(uv); + + // Four corners in 2D of a tile + float a = random(uv_index); + float b = random(uv_index + vec2(1.0, 0.0)); + float c = random(uv_index + vec2(0.0, 1.0)); + float d = random(uv_index + vec2(1.0, 1.0)); + + vec2 blur = smoothstep(0.0, 1.0, uv_fract); + + return mix(a, b, blur.x) + + (c - a) * blur.y * (1.0 - blur.x) + + (d - b) * blur.x * blur.y; +} + +float fbm(vec2 uv, float time) { + int octaves = roughness; + float amp = 0.01 * energy * progress; + float freq = float(frequency); + float value = 0.0; + + for(int i = 0; i < octaves; i++) { + value += amp * noise(freq * vec2(uv.x, uv.y + time)); + amp *= 0.5; + freq *= 2.0; + } + return value; +} + +vec4 difference(vec4 base, vec4 blend){ + return abs(base - blend); +} + +vec4 bolt(vec2 uv, float time, float i) +{ + // Setup the beam locking to the edges. + float falloff = smoothstep(0.0, fixed_edge_size, uv.x) * smoothstep(0.0, fixed_edge_size, 1.0 - uv.x); + + // Use Fractal Brownian Motion to create a \"cloud texture\" and use Difference blend mode to make the beam + vec4 clouds = vec4(fbm((uv + vec2(i) ) * noise_scale, time * speed)) * falloff; + vec4 diff_clouds = difference(clouds, vec4(uv.y - 0.5 + y_offset + (uv.y * falloff * 0.02 * energy * progress))); + + // Create a new noise to mask the beams on low \"progress\" values. To make a \"turn-off\" effect more visually interesting. + vec4 clouds2 = vec4(fbm((uv * 2.0) * noise_scale, time * 1.)) * 5.0; + diff_clouds += smoothstep(0.0, 0.8, clouds2) * 0.1 * (1.-progress); + + // Set thickness of the beams. First beam is the Thickness size and all following beams are sized with beam_difference + float thickness2 = 1. - ( thickness / (min(i + beam_difference, 1.0) + (1.0-beam_difference))) * progress ; + vec4 beam = clamp(smoothstep(thickness2, thickness2 + 0.005 * progress, 1.0 - diff_clouds), vec4(0.0), vec4(1.0)); + + //Set the beam outlines + vec4 beam_outline; + float outline = thickness2 - (outline_thickness * progress); + beam_outline = clamp(smoothstep(outline, outline + 0.04, 1.0 - diff_clouds), 0.0, 1.0); + beam_outline = clamp(beam_outline - beam, 0.0, 1.0); + + // Merge the beam and the outline and return to the fragment function + return (beam * (color + vec4(glow, glow, glow, 0.))) + (beam_outline * (outline_color + vec4(outline_glow, outline_glow, outline_glow, 0.))); +} + +void fragment() +{ + vec4 beam = vec4(0.0); + + for (int i = 0; i < beams; i++){ + beam = max(beam, bolt(UV, TIME, float(i))); + } + + vec2 coord = UV.xy / (TEXTURE_PIXEL_SIZE.xy); + float over_dist = max(sign(dist - coord.x), 0.); + + COLOR = beam * over_dist; +}" + +[resource] +shader = SubResource( 1 ) +shader_param/beams = 2 +shader_param/energy = 10.0 +shader_param/roughness = 3 +shader_param/frequency = 20 +shader_param/speed = 1.0 +shader_param/thickness = 0.035 +shader_param/outline_thickness = 0.052 +shader_param/beam_difference = 0.049 +shader_param/glow = 0.0 +shader_param/outline_glow = 0.0 +shader_param/color = Color( 0.91, 1, 1, 1 ) +shader_param/outline_color = Color( 0.5, 1, 0.96, 1 ) +shader_param/progress = 0.731 +shader_param/dist = 1000.0 +shader_param/y_offset = -0.376 +shader_param/fixed_edge_size = 0.05 +shader_param/noise_scale = Vector2( 1, 1 ) diff --git a/src/Sounds/default_bus_layout.tres b/src/Sounds/default_bus_layout.tres index 9b97794..7733fda 100644 --- a/src/Sounds/default_bus_layout.tres +++ b/src/Sounds/default_bus_layout.tres @@ -41,7 +41,7 @@ resource_name = "LowPassFilter" cutoff_hz = 3000.0 [resource] -bus/0/volume_db = -6.0206 +bus/0/volume_db = -3.74173 bus/1/name = "Music" bus/1/solo = false bus/1/mute = false diff --git a/src/UserInterface/Screens/HUD.gd b/src/UserInterface/Screens/HUD.gd index 4a513ff..50fdae8 100644 --- a/src/UserInterface/Screens/HUD.gd +++ b/src/UserInterface/Screens/HUD.gd @@ -3,7 +3,8 @@ extends Control # Smart ist es die notwendigen Resourcen vor dem Skriptstart zu laden onready var current_scene := get_tree().get_current_scene() onready var pause_overlay: ColorRect = $HUDOverlay -onready var timer: Label = $GetBackTimer +onready var hud_timer: MarginContainer = $GetBackTimer +onready var time_label: Label = $GetBackTimer/TimeLabel onready var currency: Label = $Currency onready var level_state := get_tree().root.get_child(4).get_node("%LevelState") onready var signal_manager := get_tree().root.get_child(4).get_node("%SignalManager") @@ -16,11 +17,11 @@ func _ready(): update_interface() func _process(delta): - if timer.visible: - timer.text = String(round($GetBackTimer/Timer.time_left)) + if hud_timer.visible: + time_label.text = String(round($GetBackTimer/Timer.time_left)) func start_timer(time): - timer.visible = true + hud_timer.visible = true $GetBackTimer/Timer.wait_time = time $GetBackTimer/Timer.start() $GetBackTimer/AnimationPlayer.play("Redlight") @@ -29,8 +30,8 @@ func start_timer(time): func _zoom_timer() -> void: var tween := create_tween() - tween.parallel().tween_property(timer, "rect_position", Vector2(295, 0), 1.0) - tween.parallel().tween_property(timer, "rect_scale", Vector2(1,1), 1.0) + #tween.parallel().tween_property(hud_timer, "rect_position", Vector2(295, 0), 1.0) + tween.parallel().tween_property(hud_timer, "rect_scale", Vector2(1,1), 1.0) func update_interface() -> void: diff --git a/src/UserInterface/Screens/HUD.tscn b/src/UserInterface/Screens/HUD.tscn index 101b546..4c07390 100644 --- a/src/UserInterface/Screens/HUD.tscn +++ b/src/UserInterface/Screens/HUD.tscn @@ -1,8 +1,28 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://assets/meta/ui_theme.tres" type="Theme" id=1] +[ext_resource path="res://assets/ui/sci-fi-godot-theme/sci-fi-theme.tres" type="Theme" id=2] [ext_resource path="res://src/UserInterface/Screens/HUD.gd" type="Script" id=5] +[sub_resource type="Gradient" id=8] +interpolation_mode = 2 +offsets = PoolRealArray( 0, 0.8 ) +colors = PoolColorArray( 0, 0, 0, 0.635294, 0, 0, 0, 0 ) + +[sub_resource type="GradientTexture2D" id=7] +gradient = SubResource( 8 ) +width = 70 +height = 40 +fill = 1 +fill_from = Vector2( 0.5, 0.5 ) +fill_to = Vector2( 0.95, 0.95 ) + +[sub_resource type="DynamicFontData" id=12] +font_path = "res://assets/ui/fonts/Kenney Thick.ttf" + +[sub_resource type="DynamicFont" id=13] +font_data = SubResource( 12 ) + [sub_resource type="Animation" id=1] length = 0.001 tracks/0/type = "value" @@ -53,27 +73,44 @@ size_flags_horizontal = 3 size_flags_vertical = 3 color = Color( 0, 0, 0, 0 ) -[node name="GetBackTimer" type="Label" parent="."] -unique_name_in_owner = true +[node name="GetBackTimer" type="MarginContainer" parent="."] visible = false anchor_left = 0.5 anchor_right = 0.5 -margin_left = -140.0 -margin_right = -90.0 -margin_bottom = 21.0 +margin_left = -70.0 +margin_right = 70.0 +margin_bottom = 80.0 +rect_scale = Vector2( 2, 2 ) +theme = ExtResource( 2 ) + +[node name="TextureRect" type="TextureRect" parent="GetBackTimer"] +margin_right = 140.0 +margin_bottom = 80.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +texture = SubResource( 7 ) +expand = true +stretch_mode = 1 + +[node name="TimeLabel" type="Label" parent="GetBackTimer"] +unique_name_in_owner = true +margin_right = 140.0 +margin_bottom = 80.0 grow_horizontal = 2 grow_vertical = 2 -rect_scale = Vector2( 5, 5 ) -size_flags_horizontal = 0 -size_flags_vertical = 0 +size_flags_horizontal = 15 +size_flags_vertical = 15 +custom_fonts/font = SubResource( 13 ) text = "100" align = 1 +valign = 1 [node name="Timer" type="Timer" parent="GetBackTimer"] wait_time = 100.0 one_shot = true [node name="AnimationPlayer" type="AnimationPlayer" parent="GetBackTimer"] +root_node = NodePath("../TimeLabel") anims/RESET = SubResource( 1 ) anims/Redlight = SubResource( 2 )