From cd587efa9791442c11fd4500c9d7f1f8b53bbd63 Mon Sep 17 00:00:00 2001 From: OddlyTimbot Date: Mon, 15 Jul 2024 08:00:42 -0400 Subject: [PATCH] adding 2d platform example --- examples/PlatformTemplate/.gitattributes | 2 + examples/PlatformTemplate/.gitignore | 2 + .../PlatformTemplate/assets/Basic Tilemap.png | Bin 0 -> 4686 bytes .../assets/Basic Tilemap.png.import | 34 ++ .../Player Idle/Player Idle 48x48.aseprite | Bin 0 -> 7914 bytes .../assets/Player Idle/Player Idle 48x48.png | Bin 0 -> 1853 bytes .../Player Idle/Player Idle 48x48.png.import | 34 ++ .../Player Idle/Player Idle2 48x48-sheet.png | Bin 0 -> 1911 bytes .../Player Idle2 48x48-sheet.png.import | 34 ++ .../Player Jump/player jump 48x48.aseprite | Bin 0 -> 2172 bytes .../assets/Player Jump/player jump 48x48.png | Bin 0 -> 1021 bytes .../Player Jump/player jump 48x48.png.import | 34 ++ .../Player Land/player land 48x48.aseprite | Bin 0 -> 6183 bytes .../assets/Player Land/player land 48x48.png | Bin 0 -> 1500 bytes .../Player Land/player land 48x48.png.import | 34 ++ .../Player Run/player run 48x48.aseprite | Bin 0 -> 6496 bytes .../assets/Player Run/player run 48x48.png | Bin 0 -> 3199 bytes .../Player Run/player run 48x48.png.import | 34 ++ examples/PlatformTemplate/icon.svg | 1 + examples/PlatformTemplate/icon.svg.import | 37 +++ examples/PlatformTemplate/project.godot | 68 ++++ .../scenes/Player Idle2 48x48-sheet.png | Bin 0 -> 1911 bytes .../Player Idle2 48x48-sheet.png.import | 34 ++ .../PlatformTemplate/scenes/areatrigger.tscn | 11 + examples/PlatformTemplate/scenes/blank.tscn | 8 + examples/PlatformTemplate/scenes/bullet.gd | 21 ++ examples/PlatformTemplate/scenes/bullet.tscn | 15 + examples/PlatformTemplate/scenes/game.tscn | 291 ++++++++++++++++++ .../PlatformTemplate/scenes/platform.tscn | 11 + examples/PlatformTemplate/scenes/player.tscn | 206 +++++++++++++ .../PlatformTemplate/scenes/rigidbody.tscn | 10 + .../PlatformTemplate/scripts/areatrigger.gd | 20 ++ .../scripts/gamecontroller.gd | 32 ++ .../scripts/playermovement.gd | 97 ++++++ 34 files changed, 1070 insertions(+) create mode 100644 examples/PlatformTemplate/.gitattributes create mode 100644 examples/PlatformTemplate/.gitignore create mode 100644 examples/PlatformTemplate/assets/Basic Tilemap.png create mode 100644 examples/PlatformTemplate/assets/Basic Tilemap.png.import create mode 100644 examples/PlatformTemplate/assets/Player Idle/Player Idle 48x48.aseprite create mode 100644 examples/PlatformTemplate/assets/Player Idle/Player Idle 48x48.png create mode 100644 examples/PlatformTemplate/assets/Player Idle/Player Idle 48x48.png.import create mode 100644 examples/PlatformTemplate/assets/Player Idle/Player Idle2 48x48-sheet.png create mode 100644 examples/PlatformTemplate/assets/Player Idle/Player Idle2 48x48-sheet.png.import create mode 100644 examples/PlatformTemplate/assets/Player Jump/player jump 48x48.aseprite create mode 100644 examples/PlatformTemplate/assets/Player Jump/player jump 48x48.png create mode 100644 examples/PlatformTemplate/assets/Player Jump/player jump 48x48.png.import create mode 100644 examples/PlatformTemplate/assets/Player Land/player land 48x48.aseprite create mode 100644 examples/PlatformTemplate/assets/Player Land/player land 48x48.png create mode 100644 examples/PlatformTemplate/assets/Player Land/player land 48x48.png.import create mode 100644 examples/PlatformTemplate/assets/Player Run/player run 48x48.aseprite create mode 100644 examples/PlatformTemplate/assets/Player Run/player run 48x48.png create mode 100644 examples/PlatformTemplate/assets/Player Run/player run 48x48.png.import create mode 100644 examples/PlatformTemplate/icon.svg create mode 100644 examples/PlatformTemplate/icon.svg.import create mode 100644 examples/PlatformTemplate/project.godot create mode 100644 examples/PlatformTemplate/scenes/Player Idle2 48x48-sheet.png create mode 100644 examples/PlatformTemplate/scenes/Player Idle2 48x48-sheet.png.import create mode 100644 examples/PlatformTemplate/scenes/areatrigger.tscn create mode 100644 examples/PlatformTemplate/scenes/blank.tscn create mode 100644 examples/PlatformTemplate/scenes/bullet.gd create mode 100644 examples/PlatformTemplate/scenes/bullet.tscn create mode 100644 examples/PlatformTemplate/scenes/game.tscn create mode 100644 examples/PlatformTemplate/scenes/platform.tscn create mode 100644 examples/PlatformTemplate/scenes/player.tscn create mode 100644 examples/PlatformTemplate/scenes/rigidbody.tscn create mode 100644 examples/PlatformTemplate/scripts/areatrigger.gd create mode 100644 examples/PlatformTemplate/scripts/gamecontroller.gd create mode 100644 examples/PlatformTemplate/scripts/playermovement.gd diff --git a/examples/PlatformTemplate/.gitattributes b/examples/PlatformTemplate/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/examples/PlatformTemplate/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/examples/PlatformTemplate/.gitignore b/examples/PlatformTemplate/.gitignore new file mode 100644 index 0000000..4709183 --- /dev/null +++ b/examples/PlatformTemplate/.gitignore @@ -0,0 +1,2 @@ +# Godot 4+ specific ignores +.godot/ diff --git a/examples/PlatformTemplate/assets/Basic Tilemap.png b/examples/PlatformTemplate/assets/Basic Tilemap.png new file mode 100644 index 0000000000000000000000000000000000000000..50935cf878c6120a87303e5291e0a811ef8735be GIT binary patch literal 4686 zcmV-U60z-xP)Px{2uVaiRCt{2U2lk7)fNBE>}F z2?imAepK89(G3ZHk|0Pxf*}s8a=iPh$+`?VepDv?^@qPWjg*5pWSDWGF^i(Wb zw?gfJb_!x@+hi9E}c+0Z-CdWlS0=j7gwsJb^fp#~A!cho4W3y*Vp9-3pldZtWv0(v!nV!p4H~}|rj4Xl&1p|TiFCl^ z^c1GgT>=1X+q~W<9RBuApSy(1GqbpNe4{6D?Hb@0auA<5=-3X>gbKhXL|z5}F3-&3 z=E8OKmj`k0_(tnBTN^e$aXX_UJAl85KvRGK3?Xum;BGElM`e5y8Z+n7Ummnxv$bL4 z6L&;(WCsAvP9ULF#y4T0+=u$9vz`z+c$pguw*df+nezaE%J?P#@MydvWE<6qEk+p{ z37t9uN=Y?D!UW*GrLHnT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O@O`h)u9u(nRm|zh(7*cdvjPD89}!D68qRka Q7ytkO07*qoM6N<$f^GE|$N&HU literal 0 HcmV?d00001 diff --git a/examples/PlatformTemplate/assets/Basic Tilemap.png.import b/examples/PlatformTemplate/assets/Basic Tilemap.png.import new file mode 100644 index 0000000..e925f20 --- /dev/null +++ b/examples/PlatformTemplate/assets/Basic Tilemap.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cvq2wqwuubxpi" +path="res://.godot/imported/Basic Tilemap.png-1dbb404d7ba49a841d050dea4f83a3be.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/Basic Tilemap.png" +dest_files=["res://.godot/imported/Basic Tilemap.png-1dbb404d7ba49a841d050dea4f83a3be.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/examples/PlatformTemplate/assets/Player Idle/Player Idle 48x48.aseprite b/examples/PlatformTemplate/assets/Player Idle/Player Idle 48x48.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..5c25cee1d1d52381070726ecfb9acf1b49a3e729 GIT binary patch literal 7914 zcmeHL2~<2%sQ#l0ZQ#OkF@^tVqIIqwHw4DhY&vVHpB4 zD(WaAxZ#R3txk_ZB!FSWx*X|%y8@jlIux|l2*~T72ScJVmebQYM_cYY`I3{Dyzl$} z`@R3&`**Prx_`g~apB+~5<(~fUb-;_k+feT3pjp?VM9TvuXh5$Ispi5;6>#SlzMdc z;jhW&`f*Tns3w z;R4S2ECDcZ^(?@pflh$DdES70ei|TGlnMBoga?38yK%sX%N>B1ZVdq9Fc8{({0v}L zdJf=fi3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3m`GpN3K$tB@1J5^x_222gsNe_p44C>fEPa&ETL|dH>uEq^ph2ifY1Yrr z4>!*bj<%M+pp{AnE5w^)m2M>W#W!x(PRI&03mbes)jivM7E|DnJ@2%A(L7%EuKbyb z6WC0QoYhede>f_nBK*{efiQyRO)G1kYEdGY?AR8J3!1BQg>GYZv!^WXna<60z3h+4 z&F5cp^E+FW-%kri|5q%0CDuj$Ox4jV!kh|%S%yi6<(E`w*Iet3Xqw~M+Hv!0pV;s8 zl49Jv;N zqd~}Us_{+nByaUvX&z#BS|fEzw)RGS1%VTF%?m5NAl|mq`;WVDza#Rc-RkM*%Y?|+ zt6eyf$GWhVy85d(US2Gxhnq31#5Q>wuXJx}4**=ILIB?R!MZ&q!+br*hebqDVnABC8|0$xcK4xV4hFk99jg6TQTZ VJAB;X;|{+(Uc<+0`2Thd{}+NU<)Huo literal 0 HcmV?d00001 diff --git a/examples/PlatformTemplate/assets/Player Idle/Player Idle 48x48.png b/examples/PlatformTemplate/assets/Player Idle/Player Idle 48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..b618511699269f9bd10ff834f6b382e147588ebd GIT binary patch literal 1853 zcma)7_g9k%7X30{KoA&uC&-k*2m(V}iiV98siI(^NQA(IG9>gOk_3>BBH$vuD&Qj0 zI|zutNC=Ul^rDWTh5#RBW5}0Z;id z0D!HW)LQ)TllZ>qrSM6Dh1{@21Fy#v)&T&1WM%eGr^rIaB8?#7EyK6Nbb3T-b(Qi9 z@b#CjK%>(Gp1cawwlgV<%ZmI`{@Js?c9fa+O`30QKn z&+sZ~v0+J1(Lfg1ne4(UQpF`e_K~L-=Dh`*_s2~4yA!0s+1dw}vR;TC2RIxU>xLj{;*R8j77@10XAu$?wdl)rA^c$Yi(opzgK>%z zXlNW1h(?gJl}r_y8Ksx1eM^;cQRnkFdTqXE93tu3q=FMR0ym+0`DJx6&}P2XkR}y% z_Do=U*?$^VodIz8N(hm9P}jrV-?lF6ZgppqvYR5*-Shi9&LR6E?W) z2TU|K#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d#TX>icGu47e;gM&R|gm?e_n& bN&!0SPu?JUbmW-)p#tu%-Y#^fup55^r@ppj literal 0 HcmV?d00001 diff --git a/examples/PlatformTemplate/assets/Player Idle/Player Idle2 48x48-sheet.png.import b/examples/PlatformTemplate/assets/Player Idle/Player Idle2 48x48-sheet.png.import new file mode 100644 index 0000000..fd4df36 --- /dev/null +++ b/examples/PlatformTemplate/assets/Player Idle/Player Idle2 48x48-sheet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b2nsy4x6du75k" +path="res://.godot/imported/Player Idle2 48x48-sheet.png-2c39850c55f7fa37e138d625a613fe6a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/Player Idle/Player Idle2 48x48-sheet.png" +dest_files=["res://.godot/imported/Player Idle2 48x48-sheet.png-2c39850c55f7fa37e138d625a613fe6a.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/examples/PlatformTemplate/assets/Player Jump/player jump 48x48.aseprite b/examples/PlatformTemplate/assets/Player Jump/player jump 48x48.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..03ee618d14505327fffd607de916ad7fc8731fe1 GIT binary patch literal 2172 zcmcJPdrVVT9LIm9r4O_Pia?7zE-R=w#|lnHXOV|a91l^P)rwPU3yux}5tL3`tB}^` zI&=xRZmXFhkTN5v!Lhi3_<(_#Tj~^NA}%#!ZgI12O4QK(dU)6x<{wKuH}{)!@44su z`<(kbzf;Ku7^tU%7%vKF0HDJAX~TEUm*9ifi)c9vfJgUyNK|Kp0K8cg3F#8{=1+SuJr$?a1N+qa?iDj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*I+)?+i6pP zb5-*s+5hlG#%BE#4dk>RG-MFBXG_%!ScGdNZ!AS+>7YPy@(N|4H*HrGsz17| b5SX^^Tv~OEXS^zehN-eY$1>;le+u+pc7{&> literal 0 HcmV?d00001 diff --git a/examples/PlatformTemplate/assets/Player Jump/player jump 48x48.png b/examples/PlatformTemplate/assets/Player Jump/player jump 48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..dff105cfac881171ef96781bd9bbd40e413dd6a7 GIT binary patch literal 1021 zcmVmEQ7U} zLs5iSL^ysQndjn_Z_)cK!3y?8`13c+Y_To1lzKf`rD(zM^$i(L=C%6^9Hexzmp9TP7J z3x2D_5a!4t4@Lw;++IjPL?TE)*M!XouFOAKKtr?u-6Zv(YkUXdi)sf zak0Mh>nO11+UfNJza4o$n<0Rk1Z07%>MV|KH|Cnd*}PH={w!JoU_k}q;T@2{2S2OR zD+a#QyBe@rHR$i1USRL^qA`5(r#B^2wb1c{XQEaxHcV>?NY(}bx#42)8SNHPEAhx+ zwgbTUmm?2ozQJTIB3(a3CTazbJxT1)Zea|u@~8|2{NOX;WZ4432(zCtQ7d>^3MYza z`pO61;cUJh#UB&2?YppT6D78R|4^6h|6#?IDsW4&75XzcI( zI|u+6TJ`se!ZF#4lOpqh+0S5p*beUt&(-{yaUWs}2=GNDGqzgZXbL{yCx91`EdrAH za5aCX+;6jxRN?`E{`@|6r*cN^Po;%Do_#4@uM~^*CnFzWVt7lNu6Os9ze}qfq(y&z zAN~3LRNk#6AiixSnJ2yu4LOwnk>Ay7)+Q(!7+wzKMJ61R2SEE47DYJB3DHoS125zG z=NfjWa)C7$d|>gvJRb?fU-ZQUv9Iw_V7=DGio;H>%!gN%iq-8`MjGM)49-BT&x$2f zCLY@o5T)$9hFE?0!P#ULO;mw=BX5G;-Lu&+QdMkLz^zYNPI6;W(H&45@yQ*hzGvh%)2y re59^(3$vL{@`WG>f*=TjXb=AZ>!Ac3Jx|zZ00000NkvXXu0mjfKxWs7 literal 0 HcmV?d00001 diff --git a/examples/PlatformTemplate/assets/Player Jump/player jump 48x48.png.import b/examples/PlatformTemplate/assets/Player Jump/player jump 48x48.png.import new file mode 100644 index 0000000..fa544a6 --- /dev/null +++ b/examples/PlatformTemplate/assets/Player Jump/player jump 48x48.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dwet0pba0buvn" +path="res://.godot/imported/player jump 48x48.png-18e43dc1eb2d83ed8bd50579ed79387c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/Player Jump/player jump 48x48.png" +dest_files=["res://.godot/imported/player jump 48x48.png-18e43dc1eb2d83ed8bd50579ed79387c.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/examples/PlatformTemplate/assets/Player Land/player land 48x48.aseprite b/examples/PlatformTemplate/assets/Player Land/player land 48x48.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..73df59443222720a2c4e70d1d5612e32b73ad8ff GIT binary patch literal 6183 zcmeHL4Nw$i7=DlA{^URnl>-i3gaHM`1(m=q4vr8K2|M)s0rSp7%u_%>O-kex2^Ca8 zC&0@t$H{b}Ca&xU$F!gf1&h=~n-UImbjs4}2h5-C-Q9y*!fBkwrg4Vd;n|zp+xLCm zZ=dh^-j5&|K*t*rAn_!C2LQA2&vEzxkN)yMJMx_Y{=7M&KWhhO@+AE1`3U>9|3U$b zBc>w8k5?dOMuj2n)I5QBDK`-D!t0rcKR50{ylsm>ti3!N(eMe0`1tN@#H8hu5!Fcn zh~bJTM5S^yBB|Ykn3mm%s5eoFi(9)9Pkna>k-`JO^!A5{n>UmqE;kq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w zz3N0s+uis?-$gza8N~g%?(1h5TC{<2X$`Z}VhyZRH}RYK=Q`D8?+8r`mz?cTm$sh9 zrfiFv-`IO+Yu%2=rk#y&fmb({)U$ht!5-E}t*%f=>0~C^EV-$@}DOJy|VYjHXca7pu>Fd9YjCa-Ra9^L~YMHJwYzZr#-?MUu zh8Vxo)g5=H#VL~-yjHJi@2)(zuZ#yl9_7E!={GPgHwm!Z26bR>?5Oa{Yl*3*?l%9V z6nEu^SiIKTi1HAH_|U$WJqdu4x=n}KZ7OYJT$X~qR?JA-SgdUCaQCq>;jegGma9k-2cneLy1{5*ugCMD`cTn%R)p9=6#20!hsBo&W#< literal 0 HcmV?d00001 diff --git a/examples/PlatformTemplate/assets/Player Land/player land 48x48.png b/examples/PlatformTemplate/assets/Player Land/player land 48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..2c24d6f4357ea83410f70d7fd04f5f77d36e323c GIT binary patch literal 1500 zcmZ`(c{J2}6rbS{W2x*>ae5=$WV|G@{V3aTh>@|yj1p0{q{&!jBIjj&mhfcI3rEw# zSfVC0<(ZPPq%vihC>}BlW-y?f66-h0knKKI`5_j_}FecV-Gx-bX?qJr{p zK|>(WHmPo*ATK==bCGUR0Zm4`pMhOwrG_(ac=d^&;s`cuczD`3a`2UekIYSi!vEhE_2gXUZ z`>2lA0aVUl!ipl4)M2G7&jk5- zueX+{Q<$RXgv^4)z7J56y{nwDTSZwLnds}I^b+R)xVg)oy3(v|zyYCV7jcl{V&`eH zR<{#p__VAnX<$KShGU_|+1i_^Y~F*;c^AEn#V&j7CST{#FtLYZ?zhKk-Ij#JNP( z0#rfL*Ot#*>Q^=%>3MH6XcTBxXbiDG@Fysm(P9h(sEC_y+^!6nanw)#nvb76OcW$m<%w>4#SF}U6? zU{5N6f*MeM5tjKeBh?%Cg;(DoU$P~Pfbxv8JqVlK6rBSfu8cg;TA(KLf6!HWVP3ia>!?%Bg zr!k$`xxOQaTe2s*&BU&(qC1oCXiBAn>$l@^t}2&aYq8$^?S4Tr<@tD`6H7WC zc&)=Z)T#7X3O5U_WHeguvNI@JejLy+hL92bmcyjF!hGCjpG-4Ayy zN%xK*Oj;}g15ohn=jPth?HF$`4>CKR~#|pOGo;Zn#Bt(0*3Jr z7c+#-+>V%CZ`$6*aKHl+8zHKVzWGp)VWSBDvJ-9nWcDR_kj1y73x#o9vS?jEPbL!E zC-Q11@w)sm?2~FutFt^j`I~dUCCN|s0~Wam-|BB-J)6m&)7Gyub1_jq$N^8Ks^f_B zG4ayxW2?#p^YbLa#vXQhYR)a;gt4hu90y1e1cL8TX?D4*=ow-8u{LQVISfmC*~Aeh zO600g?G$ut5L*)=9n`mCx^2CNfeHH%VT!kOp^^al51BJYu&<_ zd3BNjmEo}7p3TiqK}7Q|Z70)kXDr_zJ7Or!$XoQZ~kYxLu?(@_xT#dDwzVc3n=W^8ylyaMDlb zU2c$pm(XK1UK42TKTk5v8%yXN5+8>59J`N}m7O{n=;UA38v!*Poeg&GiPPr=CIoHn zl+f*^uer=Ylf|#^MZbS0gu+wg$J-oycQRlC$^4?!q4%iVEn!j#o!l`}DLh~lk4t5A urjx%H1FaTxt0ohAmlSPm_kZleXTci)B8?P-SwXx1Fr!?3Tv|`!vi<>k{PDv8 literal 0 HcmV?d00001 diff --git a/examples/PlatformTemplate/assets/Player Land/player land 48x48.png.import b/examples/PlatformTemplate/assets/Player Land/player land 48x48.png.import new file mode 100644 index 0000000..c3594a4 --- /dev/null +++ b/examples/PlatformTemplate/assets/Player Land/player land 48x48.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c6lw8fwtnb42b" +path="res://.godot/imported/player land 48x48.png-7730f0c5cb93b7ec543d0e1cb7f45fa8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/Player Land/player land 48x48.png" +dest_files=["res://.godot/imported/player land 48x48.png-7730f0c5cb93b7ec543d0e1cb7f45fa8.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/examples/PlatformTemplate/assets/Player Run/player run 48x48.aseprite b/examples/PlatformTemplate/assets/Player Run/player run 48x48.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..e997fac46d04369a8208f15b7c660e9cf8211fc8 GIT binary patch literal 6496 zcmdT|3sh5A);{4TfxsmR%0PlhqVOZ*g9Z>p1QJ1cCXHqCYI1TYqkHsX07pNWhX25W`Fza z^PPRZv-wN_T1yN72fo;V000Pv@6l@#AgF%?bolyDTtpH8Lp>%qstE)zgKvE{4ygmz z3coYileE9EwV%I!U;s>J&xCfqojbJAvmKz#UN#5XhjF&h-ph}M_NDS5wC`TKK%4tG z7+TR44z#oO#X!4o?Pt&~UT6cYqx)=Vx!eS3Is8;;SH`qKE6l^7ji~E@_U13|p~c_@ zK;Fp<(58Kz0qt6m2-+3P7DKz)YbUfP937#(w_FJAooyGP%|5UI+MOHK=rNhO*akQh zqB{HPA;O`+alk>q5y0?a>@aW`H4GWX3xkD`!Z2ZsFhCd`3=PHwgHlI?VK5dL2#f-T z0P!I>M24^s69Pgs3pE%U`89iR5b(Pm@bXoo|NagIcnO5-*nWbTDE3DmFwi^@uzJnE zbKn!dF(!cxADH-22PCj$WBlJXPX6dkL!kM$8sGAxPY{9MYC%*Eyhma~120TZ^9g4U zzP22C@$+0m2?r%ASpC*l6nDCu{if}Vw8&MYKAAb;{{Bttu8*JcGV5X7tRXBial~m| zOW#{&|JU(Y_>EfXS1-lS-OI5bx8+`saCrY_VA|%ke`>G#Sv_|sTfEuM?L(Fo1Ch`4Y*ob|=9A7nN4sS-2rGXWCi% ze9L00t$r2O@HoGnKbwAdh9@h=^PF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?l~~&RmBAu)BhnFE-WEKV&4R_~%Ilw6d(W+65aq@7i`;#++RPE*XDUPTq9 zBHP9zIN9b|Wns3Rhii-fK2PwELBdb!4j_sBTaHuk(Q4~>wE`4i!b<-46TUyrAGH4K zk9^rFYAGwv@}fl&qnLHXP2N&7bM=`#e$3p>gLc~gGb<^9N8Bc#?o;cxj}P%N*1 z4Q}za`+n$xn1R3O44i@&2G|8r$j{fSkK}yB@AbU$%2IoyX8RM-f>5V7Yk^^UE-e&l z7^ZDMD}8sJm)VWdQdrL62>?`tY}_@<_dhMcZ+{|uUy08Y0hT$FG0D>iKZ&GoaUNs8 z|0!Yvc64Vw5uPp6YrGu-tVq^3l^io?yDcRhpQqnzf5U{Gqud?O&FDS{^aTm9ZEW*} zw%?|1>FH_-R9lnqg5AxcNC(ggaPV_ekGs8X!L({9UDRz7lap3uW@#b4?0dTw4vVL6 z&KIJ6or$;lUT#W=;w{czPBTz+H1xi|ag0!qF|H2vO{T#}%<6Tm=m`yWbu& zQVvg;YbTh?<1S#x^}x4||A^FdD}S$3)W^yX{04d&{V&g!G36YWtrc$M?JJgqN_{6P zVMniGwu)g(i*h=&V0knT=1lGyVC=Hh&en#uTpxT{QdskW)#hU+M$_9sY^ew J`v1_|`xpLa47dOQ literal 0 HcmV?d00001 diff --git a/examples/PlatformTemplate/assets/Player Run/player run 48x48.png b/examples/PlatformTemplate/assets/Player Run/player run 48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..aca5b5560dba7381b8b06e68e76b1cadf80992cb GIT binary patch literal 3199 zcma)9^;^@A6Mt`Xi~$1$1SS$rKnI9~AWT9A7By5FhZ0gs*VyPV2z5#h>5vvhLVEb2 z6#|ptye9JS+HM=N^|Z-|@euWVtE3n8^*?bSqWe%{ z{V-W{aT4hZ2<_8CQ3D)(XS!5(_Hx+b5)1WD<~>ZdI)J-m~pd!=O9z#Dri_@&m0->;X0VOz8_M}@&=jH)9< zAoz>Fo1E=(9R&E|=bX@VK^*3Pxe2L*kRz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xKjp{7IyqhxK!(PWi_+6Ti#9v&Xn4`POH4n;m+Lk%<^#MQn9S^(1@J3 zZlg7tAI}f^1;J3o8h5cn!?`9lkF+or9Q7+-Si%q$0;61#wf7&QFSxyF|M3Bf8SF-} zw7q~81r8G9)Xj-*W}uk0`7EuDyIKrQ0c>mMzy~8L%+QgGNkGQ51&&xQtXbH6{qI$4 zxACe8b3>AO+8KdFPP?c!Qx9gYw!{6GrS z==WVi3O>3E@SB%Kn^*OE3k&fXn!6bYx=$O!|Bp+2x^9*+7ox)Z{G!>$$wvVg>fg~T I)3Fc#A5dKsJ^%m! literal 0 HcmV?d00001 diff --git a/examples/PlatformTemplate/assets/Player Run/player run 48x48.png.import b/examples/PlatformTemplate/assets/Player Run/player run 48x48.png.import new file mode 100644 index 0000000..19eff73 --- /dev/null +++ b/examples/PlatformTemplate/assets/Player Run/player run 48x48.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://2fx0fypbda7f" +path="res://.godot/imported/player run 48x48.png-6f36800eb471b5be57d9851fb3c1e9c7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/Player Run/player run 48x48.png" +dest_files=["res://.godot/imported/player run 48x48.png-6f36800eb471b5be57d9851fb3c1e9c7.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/examples/PlatformTemplate/icon.svg b/examples/PlatformTemplate/icon.svg new file mode 100644 index 0000000..b370ceb --- /dev/null +++ b/examples/PlatformTemplate/icon.svg @@ -0,0 +1 @@ + diff --git a/examples/PlatformTemplate/icon.svg.import b/examples/PlatformTemplate/icon.svg.import new file mode 100644 index 0000000..3fbe0a0 --- /dev/null +++ b/examples/PlatformTemplate/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dj56g8261vrog" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/examples/PlatformTemplate/project.godot b/examples/PlatformTemplate/project.godot new file mode 100644 index 0000000..668c938 --- /dev/null +++ b/examples/PlatformTemplate/project.godot @@ -0,0 +1,68 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="PlatformTemplate" +run/main_scene="res://scenes/game.tscn" +config/features=PackedStringArray("4.2", "Forward Plus") +config/icon="res://icon.svg" + +[display] + +window/size/viewport_width=320 +window/size/viewport_height=180 +window/size/window_width_override=800 +window/size/window_height_override=600 +window/stretch/mode="viewport" + +[file_customization] + +folder_colors={ +"res://assets/": "green", +"res://scenes/": "purple" +} + +[input] + +runleft={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null) +] +} +runright={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null) +] +} +jump={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null) +] +} +push={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null) +] +} +blast={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) +] +} + +[rendering] + +textures/canvas_textures/default_texture_filter=0 diff --git a/examples/PlatformTemplate/scenes/Player Idle2 48x48-sheet.png b/examples/PlatformTemplate/scenes/Player Idle2 48x48-sheet.png new file mode 100644 index 0000000000000000000000000000000000000000..37770e951053bf3e4a804600e485eb933b4b74b9 GIT binary patch literal 1911 zcma)7`#;kQAOG%57LVIg8W9swEslwUjx_f&x1C52<~o_=9u9TvJ1JUd2dAWA9hc+U zq(cfbCzqlfJd-DvT*{a-j7`oqwzHl;;CVftA3m?o>-G7(-mll^@_v8FSnso{$~wvb z0I0g3b2$$Hka>BG+N&t{gXQ&V002AV?&9c|UbZ?jlAw7>8^&MvD|quP2p(hB+7?vh z5>bk9r5pwqQ_Ph9aRe@Pr7B~0j>PPn|#1FXbw>ot5su9`bW_GTkbz8NW zX4|;s0TkN21+f28NY{;rA7m z`k$ZGS^>|KBcIe{+=w8`Lh^Z*rRQjXVNs)(m}1|#VSW6l7i-=5>@PIdKpf!Wl2rU2 z>`KOHLj@AeHwRHV>JFcRu~gn8@xldRESSUd;%MyHA z{f=oBDmxW(`YmLBdJY-C-oPM!nDcj0zA2(=4IWJV8G>V4XC=V9?|ghS;KftZ**WOR zuI9oN#+e)`eq@%EyseG`ZGTnoaaT7`W1IiV(-?CIMuAR8#zCqOp=9p;;g*Q1DF(Xi zirqFYy9yO-%_2&ITZ>Atz_j)qL}$ew6nOdww*)6+OMJL=&7sCCZQ%7X#)7y_3CGJm zPvEl<-piejawVZ{nqU>A?l-btYw|bwSt7i_DW*_dG7HWgnj#E0@1~!e;j8RM%thvt zZ-h$|4MpEo7iRYkI4A9YVppsfThM>ypP@Xe9}?_QY&f*!b6+TiMQ$S=J!Cc?ZG`l2 z(Fc+UNmXl^o>Z89O%2~e)@*~2HLRxc$3A0*-D2{7MAT!n6l4r9KPdew#9ES|Q^-mL5=;lile?yT`=J6pn=eC-^tpnqsQ!0-B;031KRn#92^muW%Y*z6J4mefCe*_Y)$)K-U>>EqQIHn zv9TY15@AhblGgi@iR`Au7xE17*~GCEeHD%>*cR^8_rcqIiAL?E7C912LO~M?k(I_u zNUR6(Dj3e!t@qfYf!Iu0-v(Y^D{o3-lQ5u#1eOv)mM!PY`FFiT7~E&5tyldK6Xtqk zy!z9rVOj?_XW&&C{7JLq^$os(mb4_DWxBrLe{vS+Q4m|Ykx>|mt6lU_s~Fjnh& zr5~whsa8OFQ2~)di7_>mj2{==P8eQ`AR7ObF%wfu1CO^T8a$T?znF%9`l0zEaiL`~ zbLhZ!sMZzZCH13k5AvgqQ)VlSYinaZc$H+B=3Tg_w7iCVVSkARfiTYUV#f~hr#V#?B4pWP zlwt4D5eKyK74aIBJXfzarHSHTH7f`y(3Lap5I0$hRxA=o>cRO*ad2>uFP)5$3*2Za zz58z4Wfi)Js|ELa@e$j*^T8?;m^EE2pT%j-CZ=E0Y1nz+Z~9tc0-pG>|7~5?H{-kp zYXdnSXku8y!m-Cq4)?y2ylhi_jV53*pLOeB|CadxtrI>%x>EA*1_tLi&5}CIXT|z_8{5$y~~36VsI6PO!U0q%j2* zoHx?LAf5nZ?_N!>zdkThi``Vo5d~plcc+zB(eN`XZUHO=?tx|4n~$oZ4a{C!2$IuG z%?9vcQhqhJUBh3lTea=K_Nvd#TX>icGu47e;gM&R|gm?e_n& bN&!0SPu?JUbmW-)p#tu%-Y#^fup55^r@ppj literal 0 HcmV?d00001 diff --git a/examples/PlatformTemplate/scenes/Player Idle2 48x48-sheet.png.import b/examples/PlatformTemplate/scenes/Player Idle2 48x48-sheet.png.import new file mode 100644 index 0000000..b8a3213 --- /dev/null +++ b/examples/PlatformTemplate/scenes/Player Idle2 48x48-sheet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbum1stq6n86b" +path="res://.godot/imported/Player Idle2 48x48-sheet.png-cb7e381a11297e7d8bb895bc29d966c9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/Player Idle2 48x48-sheet.png" +dest_files=["res://.godot/imported/Player Idle2 48x48-sheet.png-cb7e381a11297e7d8bb895bc29d966c9.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/examples/PlatformTemplate/scenes/areatrigger.tscn b/examples/PlatformTemplate/scenes/areatrigger.tscn new file mode 100644 index 0000000..4087140 --- /dev/null +++ b/examples/PlatformTemplate/scenes/areatrigger.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=2 format=3 uid="uid://dt2rusldupc6v"] + +[ext_resource type="Script" path="res://scripts/areatrigger.gd" id="1_dx3rr"] + +[node name="Area2D" type="Area2D"] +script = ExtResource("1_dx3rr") + +[connection signal="area_entered" from="." to="." method="_on_area_entered"] +[connection signal="area_exited" from="." to="." method="_on_area_exited"] +[connection signal="body_entered" from="." to="." method="_on_body_entered"] +[connection signal="body_exited" from="." to="." method="_on_body_exited"] diff --git a/examples/PlatformTemplate/scenes/blank.tscn b/examples/PlatformTemplate/scenes/blank.tscn new file mode 100644 index 0000000..0c5b921 --- /dev/null +++ b/examples/PlatformTemplate/scenes/blank.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=2 format=3 uid="uid://rlf02wnv5qy0"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ceibc"] + +[node name="Node2D" type="StaticBody2D"] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_ceibc") diff --git a/examples/PlatformTemplate/scenes/bullet.gd b/examples/PlatformTemplate/scenes/bullet.gd new file mode 100644 index 0000000..67e89b0 --- /dev/null +++ b/examples/PlatformTemplate/scenes/bullet.gd @@ -0,0 +1,21 @@ +extends Area2D + +var speed = 750 + +func setSpeed(speedVal): + speed = speedVal + +func _physics_process(delta): + position += transform.x * speed * delta + +func _on_Bullet_body_entered(body): + if body.is_in_group("mobs"): + body.queue_free() + queue_free() + + +func _on_body_entered(body): + # blast the body? + if body.is_in_group("boxes"): + body.queue_free() + queue_free() diff --git a/examples/PlatformTemplate/scenes/bullet.tscn b/examples/PlatformTemplate/scenes/bullet.tscn new file mode 100644 index 0000000..a72d3eb --- /dev/null +++ b/examples/PlatformTemplate/scenes/bullet.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=3 uid="uid://xwd8bdam816x"] + +[ext_resource type="Script" path="res://scenes/bullet.gd" id="1_oo7le"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_cirwx"] +radius = 4.12311 + +[node name="Area2D" type="Area2D"] +script = ExtResource("1_oo7le") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_cirwx") + +[connection signal="area_entered" from="." to="." method="_on_area_entered"] +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/examples/PlatformTemplate/scenes/game.tscn b/examples/PlatformTemplate/scenes/game.tscn new file mode 100644 index 0000000..8f0d694 --- /dev/null +++ b/examples/PlatformTemplate/scenes/game.tscn @@ -0,0 +1,291 @@ +[gd_scene load_steps=17 format=3 uid="uid://btr1v6mjh6q7a"] + +[ext_resource type="PackedScene" uid="uid://c00dlfcxocli4" path="res://scenes/player.tscn" id="1_7jlej"] +[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_tonux"] +[ext_resource type="Texture2D" uid="uid://cvq2wqwuubxpi" path="res://assets/Basic Tilemap.png" id="2_uv2vm"] +[ext_resource type="PackedScene" uid="uid://rlf02wnv5qy0" path="res://scenes/blank.tscn" id="3_qlpj2"] +[ext_resource type="PackedScene" uid="uid://dhxfhran2kbej" path="res://scenes/rigidbody.tscn" id="4_kdau4"] +[ext_resource type="PackedScene" uid="uid://dt2rusldupc6v" path="res://scenes/areatrigger.tscn" id="5_7b553"] +[ext_resource type="PackedScene" uid="uid://xwd8bdam816x" path="res://scenes/bullet.tscn" id="7_djmta"] +[ext_resource type="PackedScene" uid="uid://b4ne0ie30580r" path="res://scenes/platform.tscn" id="8_ciwq4"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gwkyc"] +texture = ExtResource("2_uv2vm") +0:0/0 = 0 +0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:0/0/physics_layer_0/angular_velocity = 0.0 +1:0/0 = 0 +1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:0/0/physics_layer_0/angular_velocity = 0.0 +2:0/0 = 0 +2:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:0/0/physics_layer_0/angular_velocity = 0.0 +3:0/0 = 0 +3:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:0/0/physics_layer_0/angular_velocity = 0.0 +0:1/0 = 0 +0:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:1/0/physics_layer_0/angular_velocity = 0.0 +1:1/0 = 0 +1:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:1/0/physics_layer_0/angular_velocity = 0.0 +2:1/0 = 0 +2:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:1/0/physics_layer_0/angular_velocity = 0.0 +3:1/0 = 0 +3:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:1/0/physics_layer_0/angular_velocity = 0.0 +0:2/0 = 0 +0:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:2/0/physics_layer_0/angular_velocity = 0.0 +1:2/0 = 0 +1:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:2/0/physics_layer_0/angular_velocity = 0.0 +2:2/0 = 0 +2:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:2/0/physics_layer_0/angular_velocity = 0.0 +3:2/0 = 0 +3:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:2/0/physics_layer_0/angular_velocity = 0.0 +0:3/0 = 0 +0:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:3/0/physics_layer_0/angular_velocity = 0.0 +1:3/0 = 0 +1:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:3/0/physics_layer_0/angular_velocity = 0.0 +2:3/0 = 0 +2:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:3/0/physics_layer_0/angular_velocity = 0.0 +3:3/0 = 0 +3:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:3/0/physics_layer_0/angular_velocity = 0.0 +0:4/0 = 0 +0:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:4/0/physics_layer_0/angular_velocity = 0.0 +0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +1:4/0 = 0 +1:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:4/0/physics_layer_0/angular_velocity = 0.0 +1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +2:4/0 = 0 +2:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:4/0/physics_layer_0/angular_velocity = 0.0 +2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +3:4/0 = 0 +3:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:4/0/physics_layer_0/angular_velocity = 0.0 +3:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +4:4/0 = 0 +4:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:4/0/physics_layer_0/angular_velocity = 0.0 +4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +5:4/0 = 0 +5:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:4/0/physics_layer_0/angular_velocity = 0.0 +5:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8) +0:5/0 = 0 +0:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:5/0/physics_layer_0/angular_velocity = 0.0 +1:5/0 = 0 +1:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:5/0/physics_layer_0/angular_velocity = 0.0 +2:5/0 = 0 +2:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:5/0/physics_layer_0/angular_velocity = 0.0 +3:5/0 = 0 +3:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:5/0/physics_layer_0/angular_velocity = 0.0 +4:5/0 = 0 +4:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:5/0/physics_layer_0/angular_velocity = 0.0 +5:5/0 = 0 +5:5/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:5/0/physics_layer_0/angular_velocity = 0.0 +0:6/0 = 0 +0:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:6/0/physics_layer_0/angular_velocity = 0.0 +1:6/0 = 0 +1:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:6/0/physics_layer_0/angular_velocity = 0.0 +2:6/0 = 0 +2:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:6/0/physics_layer_0/angular_velocity = 0.0 +3:6/0 = 0 +3:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:6/0/physics_layer_0/angular_velocity = 0.0 +4:6/0 = 0 +4:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:6/0/physics_layer_0/angular_velocity = 0.0 +5:6/0 = 0 +5:6/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:6/0/physics_layer_0/angular_velocity = 0.0 +0:7/0 = 0 +0:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:7/0/physics_layer_0/angular_velocity = 0.0 +1:7/0 = 0 +1:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:7/0/physics_layer_0/angular_velocity = 0.0 +2:7/0 = 0 +2:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:7/0/physics_layer_0/angular_velocity = 0.0 +3:7/0 = 0 +3:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:7/0/physics_layer_0/angular_velocity = 0.0 +4:7/0 = 0 +4:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:7/0/physics_layer_0/angular_velocity = 0.0 +5:7/0 = 0 +5:7/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:7/0/physics_layer_0/angular_velocity = 0.0 +0:8/0 = 0 +0:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:8/0/physics_layer_0/angular_velocity = 0.0 +1:8/0 = 0 +1:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:8/0/physics_layer_0/angular_velocity = 0.0 +2:8/0 = 0 +2:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:8/0/physics_layer_0/angular_velocity = 0.0 +3:8/0 = 0 +3:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:8/0/physics_layer_0/angular_velocity = 0.0 +4:8/0 = 0 +4:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:8/0/physics_layer_0/angular_velocity = 0.0 +5:8/0 = 0 +5:8/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:8/0/physics_layer_0/angular_velocity = 0.0 +0:9/0 = 0 +0:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:9/0/physics_layer_0/angular_velocity = 0.0 +1:9/0 = 0 +1:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:9/0/physics_layer_0/angular_velocity = 0.0 +2:9/0 = 0 +2:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:9/0/physics_layer_0/angular_velocity = 0.0 +3:9/0 = 0 +3:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +3:9/0/physics_layer_0/angular_velocity = 0.0 +4:9/0 = 0 +4:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:9/0/physics_layer_0/angular_velocity = 0.0 +5:9/0 = 0 +5:9/0/physics_layer_0/linear_velocity = Vector2(0, 0) +5:9/0/physics_layer_0/angular_velocity = 0.0 + +[sub_resource type="TileSet" id="TileSet_66kjy"] +physics_layer_0/collision_layer = 1 +sources/0 = SubResource("TileSetAtlasSource_gwkyc") + +[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_ycvkv"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_7wahi"] +radius = 26.1725 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_wkkpi"] +size = Vector2(47, 20) + +[sub_resource type="Animation" id="Animation_sy75i"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(258, 94)] +} + +[sub_resource type="Animation" id="Animation_dn2lq"] +resource_name = "moveplatform" +loop_mode = 2 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Vector2(258, 94), Vector2(295, 94)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_potwp"] +_data = { +"RESET": SubResource("Animation_sy75i"), +"moveplatform": SubResource("Animation_dn2lq") +} + +[node name="game" type="Node2D"] +script = ExtResource("1_tonux") + +[node name="TileMap" type="TileMap" parent="."] +position = Vector2(28, -10) +tile_set = SubResource("TileSet_66kjy") +format = 2 +layer_0/tile_data = PackedInt32Array(524298, 0, 4, 524299, 0, 4, 524300, 0, 4, 524301, 0, 4, 524302, 0, 4, 524303, 0, 4, 786435, 0, 4, 786436, 0, 4, 786437, 0, 4, 786438, 0, 4, 786439, 0, 4, 786440, 0, 4, 786441, 0, 4, 786442, 0, 4, 786443, 0, 4, 786444, 0, 4, 786445, 0, 4, 786446, 0, 4, 720907, 0, 4, 720908, 0, 4, 720909, 0, 4, 720910, 0, 4, 720902, 0, 4, 720903, 0, 4, 720904, 0, 4, 786447, 65536, 4, 786448, 65536, 4, 786449, 65536, 4, 786450, 65536, 4, 786451, 65536, 4, 786452, 65536, 4, 786453, 65536, 4, 655380, 65536, 4, 655381, 65536, 4, 655382, 65536, 4, 458775, 65536, 4, 655385, 65536, 4, 655386, 65536, 4, 655387, 65536, 4, 655388, 65536, 4, 786456, 65536, 4) + +[node name="player" parent="." instance=ExtResource("1_7jlej")] +position = Vector2(166, 144) + +[node name="Camera2D" type="Camera2D" parent="player"] +position = Vector2(0, 8) +position_smoothing_enabled = true + +[node name="StaticBody2D" type="StaticBody2D" parent="."] +position = Vector2(7, 11) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2(0, 173) +shape = SubResource("WorldBoundaryShape2D_ycvkv") + +[node name="Node2D" parent="." instance=ExtResource("3_qlpj2")] +position = Vector2(232, 151) + +[node name="RigidBody2D" parent="." groups=["boxes"] instance=ExtResource("4_kdau4")] +position = Vector2(133, 135) + +[node name="RigidBody2D2" parent="." groups=["boxes"] instance=ExtResource("4_kdau4")] +position = Vector2(226, 18) +rotation = 0.634724 + +[node name="TriggerOne" parent="." instance=ExtResource("5_7b553")] +position = Vector2(357, 122) +effect = "unlock" +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="TriggerOne"] +shape = SubResource("CircleShape2D_7wahi") +debug_color = Color(0.6, 0.384314, 0.972549, 0.419608) + +[node name="TriggerOne2" parent="." instance=ExtResource("5_7b553")] +position = Vector2(465, 138) +effect = "boxdrop" +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="TriggerOne2"] +position = Vector2(-0.5, 0) +shape = SubResource("RectangleShape2D_wkkpi") +debug_color = Color(0.631373, 0.364706, 0.968627, 0.419608) + +[node name="Area2D" parent="." instance=ExtResource("7_djmta")] +position = Vector2(88, 153) + +[node name="AnimatableBody2D" parent="." instance=ExtResource("8_ciwq4")] +position = Vector2(258, 94) + +[node name="AnimationPlayer2" type="AnimationPlayer" parent="AnimatableBody2D"] +libraries = { +"": SubResource("AnimationLibrary_potwp") +} +autoplay = "moveplatform" + +[connection signal="areatrigger" from="TriggerOne" to="." method="_on_trigger_one_areatrigger"] +[connection signal="areatrigger" from="TriggerOne2" to="." method="_on_trigger_one_areatrigger"] diff --git a/examples/PlatformTemplate/scenes/platform.tscn b/examples/PlatformTemplate/scenes/platform.tscn new file mode 100644 index 0000000..8523183 --- /dev/null +++ b/examples/PlatformTemplate/scenes/platform.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=2 format=3 uid="uid://b4ne0ie30580r"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ek45w"] +size = Vector2(85.5, 13) + +[node name="AnimatableBody2D" type="AnimatableBody2D"] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0, 1) +shape = SubResource("RectangleShape2D_ek45w") +one_way_collision = true diff --git a/examples/PlatformTemplate/scenes/player.tscn b/examples/PlatformTemplate/scenes/player.tscn new file mode 100644 index 0000000..85ad84b --- /dev/null +++ b/examples/PlatformTemplate/scenes/player.tscn @@ -0,0 +1,206 @@ +[gd_scene load_steps=28 format=3 uid="uid://c00dlfcxocli4"] + +[ext_resource type="Script" path="res://scripts/playermovement.gd" id="1_rrp5c"] +[ext_resource type="Texture2D" uid="uid://b2nsy4x6du75k" path="res://assets/Player Idle/Player Idle2 48x48-sheet.png" id="2_lr1nb"] +[ext_resource type="Texture2D" uid="uid://dwet0pba0buvn" path="res://assets/Player Jump/player jump 48x48.png" id="3_8nqpn"] +[ext_resource type="Texture2D" uid="uid://2fx0fypbda7f" path="res://assets/Player Run/player run 48x48.png" id="3_pduqe"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_v3hls"] +atlas = ExtResource("2_lr1nb") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3k3pl"] +atlas = ExtResource("2_lr1nb") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_s5bpa"] +atlas = ExtResource("2_lr1nb") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y8ggy"] +atlas = ExtResource("2_lr1nb") +region = Rect2(144, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qtbxx"] +atlas = ExtResource("2_lr1nb") +region = Rect2(192, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dtyki"] +atlas = ExtResource("2_lr1nb") +region = Rect2(240, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ffign"] +atlas = ExtResource("2_lr1nb") +region = Rect2(288, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g2qw3"] +atlas = ExtResource("2_lr1nb") +region = Rect2(336, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y5klf"] +atlas = ExtResource("2_lr1nb") +region = Rect2(384, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vka0u"] +atlas = ExtResource("2_lr1nb") +region = Rect2(432, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_r2358"] +atlas = ExtResource("3_8nqpn") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mjgsl"] +atlas = ExtResource("3_8nqpn") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lvng6"] +atlas = ExtResource("3_8nqpn") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dsono"] +atlas = ExtResource("3_pduqe") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g1606"] +atlas = ExtResource("3_pduqe") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g22wv"] +atlas = ExtResource("3_pduqe") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_eolqe"] +atlas = ExtResource("3_pduqe") +region = Rect2(144, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0t01r"] +atlas = ExtResource("3_pduqe") +region = Rect2(192, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ouhby"] +atlas = ExtResource("3_pduqe") +region = Rect2(240, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a6ukc"] +atlas = ExtResource("3_pduqe") +region = Rect2(288, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_d4v3u"] +atlas = ExtResource("3_pduqe") +region = Rect2(336, 0, 48, 48) + +[sub_resource type="SpriteFrames" id="SpriteFrames_5iuqe"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_v3hls") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3k3pl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_s5bpa") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_y8ggy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qtbxx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_dtyki") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ffign") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g2qw3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_y5klf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vka0u") +}], +"loop": true, +"name": &"idle", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_r2358") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mjgsl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lvng6") +}], +"loop": false, +"name": &"jump", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_dsono") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g1606") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g22wv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_eolqe") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0t01r") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ouhby") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_a6ukc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_d4v3u") +}], +"loop": true, +"name": &"run", +"speed": 10.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_8lwox"] + +[node name="CharacterBody2D" type="CharacterBody2D"] +script = ExtResource("1_rrp5c") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_5iuqe") +animation = &"idle" +autoplay = "idle" + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0, 7) +shape = SubResource("CircleShape2D_8lwox") + +[node name="RightRaycast" type="RayCast2D" parent="."] +target_position = Vector2(20, 0) + +[node name="LeftRaycast" type="RayCast2D" parent="."] +target_position = Vector2(-20, 0) + +[node name="Label" type="Label" parent="."] +offset_left = -19.0 +offset_top = -30.0 +offset_right = 21.0 +offset_bottom = -14.0 +theme_override_font_sizes/font_size = 11 +text = "Idle" +horizontal_alignment = 1 + +[node name="MarkerRight" type="Node2D" parent="."] +position = Vector2(10, -2) + +[node name="MarkerLeft" type="Node2D" parent="."] +position = Vector2(-11, -1) diff --git a/examples/PlatformTemplate/scenes/rigidbody.tscn b/examples/PlatformTemplate/scenes/rigidbody.tscn new file mode 100644 index 0000000..fe17837 --- /dev/null +++ b/examples/PlatformTemplate/scenes/rigidbody.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://dhxfhran2kbej"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_i3bag"] + +[node name="RigidBody2D" type="RigidBody2D"] +mass = 2.0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_i3bag") +debug_color = Color(0.756863, 0.447059, 0.25098, 0.419608) diff --git a/examples/PlatformTemplate/scripts/areatrigger.gd b/examples/PlatformTemplate/scripts/areatrigger.gd new file mode 100644 index 0000000..82d278c --- /dev/null +++ b/examples/PlatformTemplate/scripts/areatrigger.gd @@ -0,0 +1,20 @@ +extends Area2D + +@export var effect = "alert" +signal areatrigger(effect, Object) + +func _on_area_entered(area): + print("area entered") + + +func _on_area_exited(area): + print("area exited") + + +func _on_body_entered(body): + print("body entered") + areatrigger.emit(effect, body) + + +func _on_body_exited(body): + print("body exited") diff --git a/examples/PlatformTemplate/scripts/gamecontroller.gd b/examples/PlatformTemplate/scripts/gamecontroller.gd new file mode 100644 index 0000000..9888d4e --- /dev/null +++ b/examples/PlatformTemplate/scripts/gamecontroller.gd @@ -0,0 +1,32 @@ +extends Node2D + +# call downward, signal upward +@onready var block = $Node2D +var boxInstance = preload("res://scenes/rigidbody.tscn") + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + + +func _on_trigger_one_areatrigger(effect, body): + match effect: + "unlock": + if !body.is_in_group("boxes"): + if is_instance_valid(block): + block.queue_free() + "boxdrop": + # make some boxes + # ensure boxes do not trigger trap! + if!body.is_in_group("boxes"): + for n in 3: + var mybox = boxInstance.instantiate() + mybox.add_to_group("boxes") + mybox.position = Vector2(465,23) + add_child(mybox) + diff --git a/examples/PlatformTemplate/scripts/playermovement.gd b/examples/PlatformTemplate/scripts/playermovement.gd new file mode 100644 index 0000000..dcc3fd2 --- /dev/null +++ b/examples/PlatformTemplate/scripts/playermovement.gd @@ -0,0 +1,97 @@ +extends CharacterBody2D + + +const SPEED = 200.0 +const JUMP_VELOCITY = -300.0 +const PUSH_FORCE = 80.0 +const BLAST_SPEED = 750 + +var pushLeftEnabled = false +var pushRightEnabled = false +var pushTarget +var faceLeft = false + +# Get the gravity from the project settings to be synced with RigidBody nodes. +var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") +@onready var animated_sprite = $AnimatedSprite2D +@onready var rightRay = $RightRaycast +@onready var leftRay = $LeftRaycast +@onready var label = $Label +@onready var markerRight = $MarkerRight +@onready var markerLeft = $MarkerLeft + +var bullet = preload("res://scenes/bullet.tscn") + +func _physics_process(delta): + # Add the gravity. + if not is_on_floor(): + velocity.y += gravity * delta + + # Handle jump. + if Input.is_action_just_pressed("jump") and is_on_floor(): + velocity.y = JUMP_VELOCITY + + # Get the input direction and handle the movement/deceleration. + # As good practice, you should replace UI actions with custom gameplay actions. + var direction = Input.get_axis("runleft", "runright") + + if Input.is_action_just_pressed("push") && pushRightEnabled && faceLeft == false: + label.text="shove" + pushTarget.apply_central_impulse(Vector2(1,0) * PUSH_FORCE * 20) + pushRightEnabled = false + + if Input.is_action_just_pressed("push") && pushLeftEnabled : + label.text="shove" + pushTarget.apply_central_impulse(Vector2(-1,0) * PUSH_FORCE * 20) + pushLeftEnabled = false + + if Input.is_action_just_pressed("blast"): + var mybullet = bullet.instantiate() + mybullet.setSpeed(-BLAST_SPEED if faceLeft else BLAST_SPEED) + owner.add_child(mybullet) + mybullet.transform = markerLeft.global_transform if faceLeft else markerRight.global_transform + + if direction: + velocity.x = direction * SPEED + faceLeft = true if direction<0 else false + animated_sprite.flip_h = true if direction < 0 else false + else: + # slow the character to a stop + velocity.x = move_toward(velocity.x, 0, SPEED) + if is_on_floor(): + if direction==0: + label.text="idle" + animated_sprite.play("idle") + else: + label.text="run" + animated_sprite.play("run") + else: + label.text="jump" + animated_sprite.play("jump") + + + move_and_slide() + # Detect colliders in the ray + if rightRay.is_colliding(): + var collider = rightRay.get_collider() + if collider is Node: + if collider.is_in_group("boxes"): + pushRightEnabled = true + pushTarget = collider + else: + pushRightEnabled = false + if leftRay.is_colliding(): + var collider = leftRay.get_collider() + if collider is Node: + if collider.is_in_group("boxes"): + pushLeftEnabled = true + pushTarget = collider + else: + pushLeftEnabled = false + + # This represents the player's inertia + # after calling move_and_slide() + for i in get_slide_collision_count(): + var c = get_slide_collision(i) + if c.get_collider() is RigidBody2D: + c.get_collider().apply_central_impulse(-c.get_normal() * PUSH_FORCE)