From 2cb646ce324bdb13e2b9d67fb95d3d13f609b585 Mon Sep 17 00:00:00 2001 From: pennyrigate Date: Mon, 9 Jan 2023 21:50:02 -0500 Subject: [PATCH] enemies now get squashed by rocks --- ...e.png-453d1492f7a12007a61b71cc1e5f2b93.md5 | 3 ++ ....png-453d1492f7a12007a61b71cc1e5f2b93.stex | Bin 0 -> 142 bytes ...e.png-b16f6dab3533202eb4820e5dc612ba6f.md5 | 4 +- ....png-b16f6dab3533202eb4820e5dc612ba6f.stex | Bin 492 -> 484 bytes graphics/backgrounds/cave.png | Bin 0 -> 273 bytes graphics/backgrounds/cave.png.import | 35 ++++++++++++++++++ graphics/tiles/cave.png | Bin 488 -> 486 bytes maps/cave.tscn | 31 +++++++--------- objects/enemy/climber.tscn | 3 ++ objects/enemy/enemy.gd | 3 +- objects/enemy/enemy_climber.gd | 15 ++++++++ objects/enemy/enemy_speedup_in_range.gd | 26 ++++++++++++- objects/enemy/snail.tscn | 15 ++++++-- objects/player/player.gd | 3 -- 14 files changed, 110 insertions(+), 28 deletions(-) create mode 100644 .import/cave.png-453d1492f7a12007a61b71cc1e5f2b93.md5 create mode 100644 .import/cave.png-453d1492f7a12007a61b71cc1e5f2b93.stex create mode 100644 graphics/backgrounds/cave.png create mode 100644 graphics/backgrounds/cave.png.import create mode 100644 objects/enemy/climber.tscn create mode 100644 objects/enemy/enemy_climber.gd diff --git a/.import/cave.png-453d1492f7a12007a61b71cc1e5f2b93.md5 b/.import/cave.png-453d1492f7a12007a61b71cc1e5f2b93.md5 new file mode 100644 index 0000000..091d2af --- /dev/null +++ b/.import/cave.png-453d1492f7a12007a61b71cc1e5f2b93.md5 @@ -0,0 +1,3 @@ +source_md5="43e86f36af66b60a97c5bc72b3ccdde0" +dest_md5="64ae32fc889df051b035c0114ce55022" + diff --git a/.import/cave.png-453d1492f7a12007a61b71cc1e5f2b93.stex b/.import/cave.png-453d1492f7a12007a61b71cc1e5f2b93.stex new file mode 100644 index 0000000000000000000000000000000000000000..15b19f6b2331b94d0b1f320ce56d20a254ca7d69 GIT binary patch literal 142 zcmZ>F2@YXkWMDYJ00Ro_KrTZO5Qn=u1q6AzxurqbVF4CCQ9!o-{{#9A;tDDr&c-j) zI5*`6tK8-*Y;=$k>Pl#QZXb0}Uc_{gQX->&!~v#x8w|pJADt)oSA2pBXYa*tfjf?! ht>5{FBcB)M(lOaKC% z6VZRA#6KJ=i0D59w{08Ask@urc!i3JsHl_1luvb1&gE2zj~X=TNGIzT!7qg zdY=L6*!pD{?c?w_OMV#UgT5agBo%=h4$|>@p1K|xY>6;&N=^mX68*@@2fB%xiW=Rc zU^x1sW+oQJJ&17BViSM0g|9)}7M58vvxRlLC-+<4r&-HZYedAHCz+}6w-f3Nmb)9w z6;qbQtK$4UI6<$>XB7WU@&EKbrqk!|{;4Gj!-czlVYPs~jS45|NaqAR#|gZHoD*0x zk>a~F8{-YV1^%exGEuFFoXZHz64shXVf>5ruJ<1~yE!TCE~}vg9wu@8e6u zm?|;4Z3Xc7D4?MOU4`MT`uk7)70GrJWIEeE` O!0?W2hnt~Lf&c&!H?D2~ delta 376 zcmV-;0f+wN1MCBk7#Yw30037-LQqmkMn=Q|0037-LQqyvI83*ZF=>B+Z7XrpIZB{& zYGnT_#s5j$6-4x(f!nr?#FKjvuBd-mf+{m#gLus>kx4{m*6TfZzs7wgnMP}x2=|yLiPXa1u2845 zR8?RunUYa7E6U%46If;%k^DEw|6|s}>GPXzwMvEI#8tnrT)?3xOX41d&hmbR|FHO9x>2*)hmS_^9pacAQ!4J=eNa8Hc0u(h_^xqolO zUyR?!mxd8?Pp!EV8*0!)JlKbRz}p^lA^8X8A6CYBtP7S;u06;3cm|du$3h&U`pTAN W0S<=4nJ@ErtU#vK#0-vR|Edb&7< zRNQ)d$5F7sL4f(-1BQZvAL5-oKfh?aI8|RhN#$v5;qJ#e35?tk3H~xb4G#Pkh1C#& z1@RBMK`tT@ykJy6w{kiw$jl%1AiWPXr-6Asla_3I%RXZZd&l>}ZQLLkPgg&ebxsLQ E0Ak8Ts{jB1 literal 0 HcmV?d00001 diff --git a/graphics/backgrounds/cave.png.import b/graphics/backgrounds/cave.png.import new file mode 100644 index 0000000..184a0cb --- /dev/null +++ b/graphics/backgrounds/cave.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/cave.png-453d1492f7a12007a61b71cc1e5f2b93.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/backgrounds/cave.png" +dest_files=[ "res://.import/cave.png-453d1492f7a12007a61b71cc1e5f2b93.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/graphics/tiles/cave.png b/graphics/tiles/cave.png index 07065a4014647e7822ec4206e20041eb1487323a..03842391f903b0731b0b9eda8f772a9fde6983f9 100644 GIT binary patch delta 325 zcmV-L0lNO^1Lgyes(&X*L_t(IPqk9*f`cFo1Hs$Pd42!Ky(DdM&ar=sN`%B3K1!*j z;x0>|0puQ_E|XM%Ivt_I;1z0jy+?(sWG+<277VoZtDA3ZX(-RjNs$h{fTk7npqW-k;}S*dBDqASM}_MsM8TT3|^sj*LzgxtLv-2=M$f>LT}){3O(eH8KOdf`ZYs@oMxa% z(=-FWAYhXKcTr3OG7f$5>Ell3o}>=PxtsZ5Pq-P-xg~x1C;Pd` zwNQque4dL0^I@2xbDoRji%8CMk<5i^+vbZyw6^Ky8(SE*4Lm@R4!wY;74)E)R!HL) zD##HTZ!7R8K0wK{!bg0^@C@GB+!&rOckC}ZWRMj&oZc$zyE~3U4$X3~D*UoJIhO@& Z_6O3mA*jFHkk$YI002ovPDHLkV1l9fp1uG8 diff --git a/maps/cave.tscn b/maps/cave.tscn index 7a1b713..a740182 100644 --- a/maps/cave.tscn +++ b/maps/cave.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1] [ext_resource path="res://tilesets/t_cave.tres" type="TileSet" id=2] @@ -7,36 +7,30 @@ [ext_resource path="res://tilesets/t_death.tres" type="TileSet" id=5] [ext_resource path="res://objects/death tile/death_tile.tscn" type="PackedScene" id=6] [ext_resource path="res://objects/enemy/snail.tscn" type="PackedScene" id=7] +[ext_resource path="res://graphics/backgrounds/cave.png" type="Texture" id=8] +[ext_resource path="res://objects/enemy/slime.tscn" type="PackedScene" id=9] [node name="Map" type="Node2D"] [node name="CanvasLayer" parent="." instance=ExtResource( 4 )] -[node name="TileMap2" type="TileMap" parent="."] -visible = false -tile_set = ExtResource( 2 ) -cell_size = Vector2( 8, 8 ) -format = 1 -tile_data = PoolIntArray( 0, 0, 3, 1, 0, 3, 2, 0, 3, 3, 0, 3, 4, 0, 3, 5, 0, 3, 6, 0, 3, 7, 0, 3, 8, 0, 3, 9, 0, 3, 10, 0, 3, 11, 0, 3, 12, 0, 3, 13, 0, 3, 14, 0, 3, 15, 0, 3, 16, 0, 3, 17, 0, 3, 18, 0, 3, 19, 0, 3, 20, 0, 3, 21, 0, 3, 22, 0, 3, 23, 0, 3, 24, 0, 3, 25, 0, 3, 26, 0, 3, 27, 0, 3, 28, 0, 3, 29, 0, 3, 30, 0, 3, 31, 0, 3, 65536, 0, 3, 65537, 0, 3, 65538, 0, 3, 65539, 0, 3, 65540, 0, 3, 65541, 0, 3, 65542, 0, 3, 65543, 0, 3, 65544, 0, 3, 65545, 0, 3, 65546, 0, 3, 65547, 0, 3, 65548, 0, 3, 65549, 0, 3, 65550, 0, 3, 65551, 0, 3, 65552, 0, 3, 65553, 0, 3, 65554, 0, 3, 65555, 0, 3, 65556, 0, 3, 65557, 0, 3, 65558, 0, 3, 65559, 0, 3, 65560, 0, 3, 65561, 0, 3, 65562, 0, 3, 65563, 0, 3, 65564, 0, 3, 65565, 0, 3, 65566, 0, 3, 65567, 0, 3, 131072, 0, 3, 131073, 0, 3, 131074, 0, 3, 131075, 0, 3, 131076, 0, 3, 131077, 0, 3, 131078, 0, 3, 131079, 0, 3, 131080, 0, 3, 131081, 0, 3, 131082, 0, 3, 131083, 0, 3, 131084, 0, 3, 131085, 0, 3, 131086, 0, 3, 131087, 0, 3, 131088, 0, 3, 131089, 0, 3, 131090, 0, 3, 131091, 0, 3, 131092, 0, 3, 131093, 0, 3, 131094, 0, 3, 131095, 0, 3, 131096, 0, 3, 131097, 0, 3, 131098, 0, 3, 131099, 0, 3, 131100, 0, 3, 131101, 0, 3, 131102, 0, 3, 131103, 0, 3, 196608, 0, 3, 196609, 0, 3, 196610, 0, 3, 196611, 0, 3, 196612, 0, 3, 196613, 0, 3, 196614, 0, 3, 196615, 0, 3, 196616, 0, 3, 196617, 0, 3, 196618, 0, 3, 196619, 0, 3, 196620, 0, 3, 196621, 0, 3, 196622, 0, 3, 196623, 0, 3, 196624, 0, 3, 196625, 0, 3, 196626, 0, 3, 196627, 0, 3, 196628, 0, 3, 196629, 0, 3, 196630, 0, 3, 196631, 0, 3, 196632, 0, 3, 196633, 0, 3, 196634, 0, 3, 196635, 0, 3, 196636, 0, 3, 196637, 0, 3, 196638, 0, 3, 196639, 0, 3, 262144, 0, 3, 262145, 0, 3, 262146, 0, 3, 262147, 0, 3, 262148, 0, 3, 262149, 0, 3, 262150, 0, 3, 262151, 0, 3, 262152, 0, 3, 262153, 0, 3, 262154, 0, 3, 262155, 0, 3, 262156, 0, 3, 262157, 0, 3, 262158, 0, 3, 262159, 0, 3, 262160, 0, 3, 262161, 0, 3, 262162, 0, 3, 262163, 0, 3, 262164, 0, 3, 262165, 0, 3, 262166, 0, 3, 262167, 0, 3, 262168, 0, 3, 262169, 0, 3, 262170, 0, 3, 262171, 0, 3, 262172, 0, 3, 262173, 0, 3, 262174, 0, 3, 262175, 0, 3, 327680, 0, 3, 327681, 0, 3, 327682, 0, 3, 327683, 0, 3, 327684, 0, 3, 327685, 0, 3, 327686, 0, 3, 327687, 0, 3, 327688, 0, 3, 327689, 0, 3, 327690, 0, 3, 327691, 0, 3, 327692, 0, 3, 327693, 0, 3, 327694, 0, 3, 327695, 0, 3, 327696, 0, 3, 327697, 0, 3, 327698, 0, 3, 327699, 0, 3, 327700, 0, 3, 327701, 0, 3, 327702, 0, 3, 327703, 0, 3, 327704, 0, 3, 327705, 0, 3, 327706, 0, 3, 327707, 0, 3, 327708, 0, 3, 327709, 0, 3, 327710, 0, 3, 327711, 0, 3, 393216, 0, 3, 393217, 0, 3, 393218, 0, 3, 393219, 0, 3, 393220, 0, 3, 393221, 0, 3, 393222, 0, 3, 393223, 0, 3, 393224, 0, 3, 393225, 0, 3, 393226, 0, 3, 393227, 0, 3, 393228, 0, 3, 393229, 0, 3, 393230, 0, 3, 393231, 0, 3, 393232, 0, 3, 393233, 0, 3, 393234, 0, 3, 393235, 0, 3, 393236, 0, 3, 393237, 0, 3, 393238, 0, 3, 393239, 0, 3, 393240, 0, 3, 393241, 0, 3, 393242, 0, 3, 393243, 0, 3, 393244, 0, 3, 393245, 0, 3, 393246, 0, 3, 393247, 0, 3, 458752, 0, 3, 458753, 0, 3, 458754, 0, 3, 458755, 0, 3, 458756, 0, 3, 458757, 0, 3, 458758, 0, 3, 458759, 0, 3, 458760, 0, 3, 458761, 0, 3, 458762, 0, 3, 458763, 0, 3, 458764, 0, 3, 458765, 0, 3, 458766, 0, 3, 458767, 0, 3, 458768, 0, 3, 458769, 0, 3, 458770, 0, 3, 458771, 0, 3, 458772, 0, 3, 458773, 0, 3, 458774, 0, 3, 458775, 0, 3, 458776, 0, 3, 458777, 0, 3, 458778, 0, 3, 458779, 0, 3, 458780, 0, 3, 458781, 0, 3, 458782, 0, 3, 458783, 0, 3, 524288, 0, 3, 524289, 0, 3, 524290, 0, 3, 524291, 0, 3, 524292, 0, 3, 524293, 0, 3, 524294, 0, 3, 524295, 0, 3, 524296, 0, 3, 524297, 0, 3, 524298, 0, 3, 524299, 0, 3, 524300, 0, 3, 524301, 0, 3, 524302, 0, 3, 524303, 0, 3, 524304, 0, 3, 524305, 0, 3, 524306, 0, 3, 524307, 0, 3, 524308, 0, 3, 524309, 0, 3, 524310, 0, 3, 524311, 0, 3, 524312, 0, 3, 524313, 0, 3, 524314, 0, 3, 524315, 0, 3, 524316, 0, 3, 524317, 0, 3, 524318, 0, 3, 524319, 0, 3, 589824, 0, 3, 589825, 0, 3, 589826, 0, 3, 589827, 0, 3, 589828, 0, 3, 589829, 0, 3, 589830, 0, 3, 589831, 0, 3, 589832, 0, 3, 589833, 0, 3, 589834, 0, 3, 589835, 0, 3, 589836, 0, 3, 589837, 0, 3, 589838, 0, 3, 589839, 0, 3, 589840, 0, 3, 589841, 0, 3, 589842, 0, 3, 589843, 0, 3, 589844, 0, 3, 589845, 0, 3, 589846, 0, 3, 589847, 0, 3, 589848, 0, 3, 589849, 0, 3, 589850, 0, 3, 589851, 0, 3, 589852, 0, 3, 589853, 0, 3, 589854, 0, 3, 589855, 0, 3, 655360, 0, 3, 655361, 0, 3, 655362, 0, 3, 655363, 0, 3, 655364, 0, 3, 655365, 0, 3, 655366, 0, 3, 655367, 0, 3, 655368, 0, 3, 655369, 0, 3, 655370, 0, 3, 655371, 0, 3, 655372, 0, 3, 655373, 0, 3, 655374, 0, 3, 655375, 0, 3, 655376, 0, 3, 655377, 0, 3, 655378, 0, 3, 655379, 0, 3, 655380, 0, 3, 655381, 0, 3, 655382, 0, 3, 655383, 0, 3, 655384, 0, 3, 655385, 0, 3, 655386, 0, 3, 655387, 0, 3, 655388, 0, 3, 655389, 0, 3, 655390, 0, 3, 655391, 0, 3, 720896, 0, 3, 720897, 0, 3, 720898, 0, 3, 720899, 0, 3, 720900, 0, 3, 720901, 0, 3, 720902, 0, 3, 720903, 0, 3, 720904, 0, 3, 720905, 0, 3, 720906, 0, 3, 720907, 0, 3, 720908, 0, 3, 720909, 0, 3, 720910, 0, 3, 720911, 0, 3, 720912, 0, 3, 720913, 0, 3, 720914, 0, 3, 720915, 0, 3, 720916, 0, 3, 720917, 0, 3, 720918, 0, 3, 720919, 0, 3, 720920, 0, 3, 720921, 0, 3, 720922, 0, 3, 720923, 0, 3, 720924, 0, 3, 720925, 0, 3, 720926, 0, 3, 720927, 0, 3, 786432, 0, 3, 786433, 0, 3, 786434, 0, 3, 786435, 0, 3, 786436, 0, 3, 786437, 0, 3, 786438, 0, 3, 786439, 0, 3, 786440, 0, 3, 786441, 0, 3, 786442, 0, 3, 786443, 0, 3, 786444, 0, 3, 786445, 0, 3, 786446, 0, 3, 786447, 0, 3, 786448, 0, 3, 786449, 0, 3, 786450, 0, 3, 786451, 0, 3, 786452, 0, 3, 786453, 0, 3, 786454, 0, 3, 786455, 0, 3, 786456, 0, 3, 786457, 0, 3, 786458, 0, 3, 786459, 0, 3, 786460, 0, 3, 786461, 0, 3, 786462, 0, 3, 786463, 0, 3, 851968, 0, 3, 851969, 0, 3, 851970, 0, 3, 851971, 0, 3, 851972, 0, 3, 851973, 0, 3, 851974, 0, 3, 851975, 0, 3, 851976, 0, 3, 851977, 0, 3, 851978, 0, 3, 851979, 0, 3, 851980, 0, 3, 851981, 0, 3, 851982, 0, 3, 851983, 0, 3, 851984, 0, 3, 851985, 0, 3, 851986, 0, 3, 851987, 0, 3, 851988, 0, 3, 851989, 0, 3, 851990, 0, 3, 851991, 0, 3, 851992, 0, 3, 851993, 0, 3, 851994, 0, 3, 851995, 0, 3, 851996, 0, 3, 851997, 0, 3, 851998, 0, 3, 851999, 0, 3, 917504, 0, 3, 917505, 0, 3, 917506, 0, 3, 917507, 0, 3, 917508, 0, 3, 917509, 0, 3, 917510, 0, 3, 917511, 0, 3, 917512, 0, 3, 917513, 0, 3, 917514, 0, 3, 917515, 0, 3, 917516, 0, 3, 917517, 0, 3, 917518, 0, 3, 917519, 0, 3, 917520, 0, 3, 917521, 0, 3, 917522, 0, 3, 917523, 0, 3, 917524, 0, 3, 917525, 0, 3, 917526, 0, 3, 917527, 0, 3, 917528, 0, 3, 917529, 0, 3, 917530, 0, 3, 917531, 0, 3, 917532, 0, 3, 917533, 0, 3, 917534, 0, 3, 917535, 0, 3, 983040, 0, 3, 983041, 0, 3, 983042, 0, 3, 983043, 0, 3, 983044, 0, 3, 983045, 0, 3, 983046, 0, 3, 983047, 0, 3, 983048, 0, 3, 983049, 0, 3, 983050, 0, 3, 983051, 0, 3, 983052, 0, 3, 983053, 0, 3, 983054, 0, 3, 983055, 0, 3, 983056, 0, 3, 983057, 0, 3, 983058, 0, 3, 983059, 0, 3, 983060, 0, 3, 983061, 0, 3, 983062, 0, 3, 983063, 0, 3, 983064, 0, 3, 983065, 0, 3, 983066, 0, 3, 983067, 0, 3, 983068, 0, 3, 983069, 0, 3, 983070, 0, 3, 983071, 0, 3, 1048576, 0, 3, 1048577, 0, 3, 1048578, 0, 3, 1048579, 0, 3, 1048580, 0, 3, 1048581, 0, 3, 1048582, 0, 3, 1048583, 0, 3, 1048584, 0, 3, 1048585, 0, 3, 1048586, 0, 3, 1048587, 0, 3, 1048588, 0, 3, 1048589, 0, 3, 1048590, 0, 3, 1048591, 0, 3, 1048592, 0, 3, 1048593, 0, 3, 1048594, 0, 3, 1048595, 0, 3, 1048596, 0, 3, 1048597, 0, 3, 1048598, 0, 3, 1048599, 0, 3, 1048600, 0, 3, 1048601, 0, 3, 1048602, 0, 3, 1048603, 0, 3, 1048604, 0, 3, 1048605, 0, 3, 1048606, 0, 3, 1048607, 0, 3, 1114112, 0, 3, 1114113, 0, 3, 1114114, 0, 3, 1114115, 0, 3, 1114116, 0, 3, 1114117, 0, 3, 1114118, 0, 3, 1114119, 0, 3, 1114120, 0, 3, 1114121, 0, 3, 1114122, 0, 3, 1114123, 0, 3, 1114124, 0, 3, 1114125, 0, 3, 1114126, 0, 3, 1114127, 0, 3, 1114128, 0, 3, 1114129, 0, 3, 1114130, 0, 3, 1114131, 0, 3, 1114132, 0, 3, 1114133, 0, 3, 1114134, 0, 3, 1114135, 0, 3, 1114136, 0, 3, 1114137, 0, 3, 1114138, 0, 3, 1114139, 0, 3, 1114140, 0, 3, 1114141, 0, 3, 1114142, 0, 3, 1114143, 0, 3, 1179648, 0, 3, 1179649, 0, 3, 1179650, 0, 3, 1179651, 0, 3, 1179652, 0, 3, 1179653, 0, 3, 1179654, 0, 3, 1179655, 0, 3, 1179656, 0, 3, 1179657, 0, 3, 1179658, 0, 3, 1179659, 0, 3, 1179660, 0, 3, 1179661, 0, 3, 1179662, 0, 3, 1179663, 0, 3, 1179664, 0, 3, 1179665, 0, 3, 1179666, 0, 3, 1179667, 0, 3, 1179668, 0, 3, 1179669, 0, 3, 1179670, 0, 3, 1179671, 0, 3, 1179672, 0, 3, 1179673, 0, 3, 1179674, 0, 3, 1179675, 0, 3, 1179676, 0, 3, 1179677, 0, 3, 1179678, 0, 3, 1179679, 0, 3, 1245184, 0, 3, 1245185, 0, 3, 1245186, 0, 3, 1245187, 0, 3, 1245188, 0, 3, 1245189, 0, 3, 1245190, 0, 3, 1245191, 0, 3, 1245192, 0, 3, 1245193, 0, 3, 1245194, 0, 3, 1245195, 0, 3, 1245196, 0, 3, 1245197, 0, 3, 1245198, 0, 3, 1245199, 0, 3, 1245200, 0, 3, 1245201, 0, 3, 1245202, 0, 3, 1245203, 0, 3, 1245204, 0, 3, 1245205, 0, 3, 1245206, 0, 3, 1245207, 0, 3, 1245208, 0, 3, 1245209, 0, 3, 1245210, 0, 3, 1245211, 0, 3, 1245212, 0, 3, 1245213, 0, 3, 1245214, 0, 3, 1245215, 0, 3, 1310720, 0, 3, 1310721, 0, 3, 1310722, 0, 3, 1310723, 0, 3, 1310724, 0, 3, 1310725, 0, 3, 1310726, 0, 3, 1310727, 0, 3, 1310728, 0, 3, 1310729, 0, 3, 1310730, 0, 3, 1310731, 0, 3, 1310732, 0, 3, 1310733, 0, 3, 1310734, 0, 3, 1310735, 0, 3, 1310736, 0, 3, 1310737, 0, 3, 1310738, 0, 3, 1310739, 0, 3, 1310740, 0, 3, 1310741, 0, 3, 1310742, 0, 3, 1310743, 0, 3, 1310744, 0, 3, 1310745, 0, 3, 1310746, 0, 3, 1310747, 0, 3, 1310748, 0, 3, 1310749, 0, 3, 1310750, 0, 3, 1310751, 0, 3, 1376256, 0, 3, 1376257, 0, 3, 1376258, 0, 3, 1376259, 0, 3, 1376260, 0, 3, 1376261, 0, 3, 1376262, 0, 3, 1376263, 0, 3, 1376264, 0, 3, 1376265, 0, 3, 1376266, 0, 3, 1376267, 0, 3, 1376268, 0, 3, 1376269, 0, 3, 1376270, 0, 3, 1376271, 0, 3, 1376272, 0, 3, 1376273, 0, 3, 1376274, 0, 3, 1376275, 0, 3, 1376276, 0, 3, 1376277, 0, 3, 1376278, 0, 3, 1376279, 0, 3, 1376280, 0, 3, 1376281, 0, 3, 1376282, 0, 3, 1376283, 0, 3, 1376284, 0, 3, 1376285, 0, 3, 1376286, 0, 3, 1376287, 0, 3, 1441792, 0, 3, 1441793, 0, 3, 1441794, 0, 3, 1441795, 0, 3, 1441796, 0, 3, 1441797, 0, 3, 1441798, 0, 3, 1441799, 0, 3, 1441800, 0, 3, 1441801, 0, 3, 1441802, 0, 3, 1441803, 0, 3, 1441804, 0, 3, 1441805, 0, 3, 1441806, 0, 3, 1441807, 0, 3, 1441808, 0, 3, 1441809, 0, 3, 1441810, 0, 3, 1441811, 0, 3, 1441812, 0, 3, 1441813, 0, 3, 1441814, 0, 3, 1441815, 0, 3, 1441816, 0, 3, 1441817, 0, 3, 1441818, 0, 3, 1441819, 0, 3, 1441820, 0, 3, 1441821, 0, 3, 1441822, 0, 3, 1441823, 0, 3, 1507328, 0, 3, 1507329, 0, 3, 1507330, 0, 3, 1507331, 0, 3, 1507332, 0, 3, 1507333, 0, 3, 1507334, 0, 3, 1507335, 0, 3, 1507336, 0, 3, 1507337, 0, 3, 1507338, 0, 3, 1507339, 0, 3, 1507340, 0, 3, 1507341, 0, 3, 1507342, 0, 3, 1507343, 0, 3, 1507344, 0, 3, 1507345, 0, 3, 1507346, 0, 3, 1507347, 0, 3, 1507348, 0, 3, 1507349, 0, 3, 1507350, 0, 3, 1507351, 0, 3, 1507352, 0, 3, 1507353, 0, 3, 1507354, 0, 3, 1507355, 0, 3, 1507356, 0, 3, 1507357, 0, 3, 1507358, 0, 3, 1507359, 0, 3 ) - -[node name="ColorRect" type="ColorRect" parent="."] -margin_right = 272.0 -margin_bottom = 212.0 -color = Color( 0.12549, 0.109804, 0.227451, 1 ) +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( 128, 96 ) +texture = ExtResource( 8 ) [node name="Player" parent="." instance=ExtResource( 1 )] -position = Vector2( 97, 119 ) +position = Vector2( 158, 135 ) [node name="TileMap" type="TileMap" parent="."] tile_set = ExtResource( 2 ) cell_size = Vector2( 8, 8 ) format = 1 -tile_data = PoolIntArray( 1245200, 0, 65537, 1245201, 0, 65537, 1245202, 0, 65537, 1245203, 0, 65537, 1376268, 0, 262144, 1376274, 0, 262144, 1376284, 0, 262144, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441800, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 0, 1441808, 0, 0, 1441809, 0, 0, 1441810, 0, 0, 1441811, 0, 0, 1441812, 0, 0, 1441813, 0, 0, 1441814, 0, 0, 1441815, 0, 0, 1441816, 0, 0, 1441817, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1507328, 0, 0, 1507329, 0, 0, 1507330, 0, 0, 1507331, 0, 0, 1507332, 0, 0, 1507333, 0, 0, 1507334, 0, 0, 1507335, 0, 0, 1507336, 0, 0, 1507337, 0, 0, 1507338, 0, 0, 1507339, 0, 0, 1507340, 0, 0, 1507341, 0, 0, 1507342, 0, 0, 1507343, 0, 0, 1507344, 0, 0, 1507345, 0, 0, 1507346, 0, 0, 1507347, 0, 0, 1507348, 0, 0, 1507349, 0, 0, 1507350, 0, 0, 1507351, 0, 0, 1507352, 0, 0, 1507353, 0, 0, 1507354, 0, 0, 1507355, 0, 0, 1507356, 0, 0, 1507357, 0, 0, 1507358, 0, 0, 1507359, 0, 0 ) +tile_data = PoolIntArray( 1245200, 0, 65537, 1245201, 0, 65537, 1245202, 0, 65537, 1245203, 0, 65537, 1310741, 0, 131072, 1310742, 0, 131073, 1376268, 0, 262144, 1376274, 0, 262144, 1376276, 0, 131072, 1376277, 0, 0, 1376278, 0, 0, 1376284, 0, 262144, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441800, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 0, 1441808, 0, 0, 1441809, 0, 0, 1441810, 0, 0, 1441811, 0, 0, 1441812, 0, 0, 1441813, 0, 0, 1441814, 0, 0, 1441815, 0, 0, 1441816, 0, 0, 1441817, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1507328, 0, 0, 1507329, 0, 0, 1507330, 0, 0, 1507331, 0, 0, 1507332, 0, 0, 1507333, 0, 0, 1507334, 0, 0, 1507335, 0, 0, 1507336, 0, 0, 1507337, 0, 0, 1507338, 0, 0, 1507339, 0, 0, 1507340, 0, 0, 1507341, 0, 0, 1507342, 0, 0, 1507343, 0, 0, 1507344, 0, 0, 1507345, 0, 0, 1507346, 0, 0, 1507347, 0, 0, 1507348, 0, 0, 1507349, 0, 0, 1507350, 0, 0, 1507351, 0, 0, 1507352, 0, 0, 1507353, 0, 0, 1507354, 0, 0, 1507355, 0, 0, 1507356, 0, 0, 1507357, 0, 0, 1507358, 0, 0, 1507359, 0, 0 ) [node name="Snail" parent="." instance=ExtResource( 7 )] -position = Vector2( 183, 171 ) -left_up_boundry = 3.0 -right_down_boundry = 3.0 +position = Vector2( 204, 171 ) +left_up_boundry = 6.0 +right_down_boundry = 6.0 [node name="Rock" parent="." instance=ExtResource( 3 )] position = Vector2( 138, 144 ) @@ -52,3 +46,6 @@ tile_set = ExtResource( 5 ) cell_size = Vector2( 8, 8 ) format = 1 tile_data = PoolIntArray( 1376261, 1, 0, 1376264, 1, 0 ) + +[node name="Slime" parent="." instance=ExtResource( 9 )] +position = Vector2( 122, 168 ) diff --git a/objects/enemy/climber.tscn b/objects/enemy/climber.tscn new file mode 100644 index 0000000..cab1dcd --- /dev/null +++ b/objects/enemy/climber.tscn @@ -0,0 +1,3 @@ +[gd_scene format=2] + +[node name="Climber" type="Node2D"] diff --git a/objects/enemy/enemy.gd b/objects/enemy/enemy.gd index a7f9370..fe7a44b 100644 --- a/objects/enemy/enemy.gd +++ b/objects/enemy/enemy.gd @@ -27,8 +27,9 @@ func _on_Area2D_area_entered(area): Game.instance_node(Game.block_text,global_position.x,global_position.y,get_parent()) #Die from rock/ get squashed if area.is_in_group("squash"): + Debug.print("squash") var squasher = area.get_parent() - if squasher.position.y + squasher.bottom.position.y < global_position.y: + if squasher.global_position.y < global_position.y && squasher.velocity.y > 0: die() func die(): diff --git a/objects/enemy/enemy_climber.gd b/objects/enemy/enemy_climber.gd new file mode 100644 index 0000000..9289230 --- /dev/null +++ b/objects/enemy/enemy_climber.gd @@ -0,0 +1,15 @@ +extends "res://objects/enemy/enemy.gd" + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# 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 diff --git a/objects/enemy/enemy_speedup_in_range.gd b/objects/enemy/enemy_speedup_in_range.gd index 228aea0..7df60c4 100644 --- a/objects/enemy/enemy_speedup_in_range.gd +++ b/objects/enemy/enemy_speedup_in_range.gd @@ -5,18 +5,38 @@ export var left_up_boundry = 0.0 export var right_down_boundry = 0.0 #Start direction export var direction = 1 -export var speed = 50 +export var slower_speed = 50 +export var faster_speed = 100 #Move horizontal or vertical export(int, "Horizontal", "Vertical") var move_direction export var flip_sprite = true #Onreadys onready var startpos = position onready var sprite = $AnimatedSprite +onready var raycast = $Area2D/RayCast2D +onready var timer = $Timer + +var speed = 50 +var go_fast = false func _physics_process(delta): if move_direction == 0: move_side_to_side(delta) else: move_up_and_down(delta) + #Speed up if in raycast + if raycast.get_collider() != null: + if raycast.get_collider().is_in_group("player"): + go_fast = true + timer.set_wait_time(0.5) + timer.start() + #chnage speed depedning on you know + if go_fast: + speed = faster_speed + else: + speed = slower_speed + #flip raycast with sprite + raycast.scale.x = sprite.scale.x + func move_side_to_side(delta): #Move @@ -39,3 +59,7 @@ func move_up_and_down(delta): if position.y <= startpos.y + (-left_up_boundry * 8): direction = 1 if flip_sprite == true: sprite.scale.y = -1 + + +func _on_Timer_timeout(): + go_fast = false diff --git a/objects/enemy/snail.tscn b/objects/enemy/snail.tscn index 7a98061..0a5ef80 100644 --- a/objects/enemy/snail.tscn +++ b/objects/enemy/snail.tscn @@ -2,7 +2,7 @@ [ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=1] [ext_resource path="res://graphics/enemy/snail.png" type="Texture" id=2] -[ext_resource path="res://objects/enemy/enemy_move_sidesideupdown.gd" type="Script" id=3] +[ext_resource path="res://objects/enemy/enemy_speedup_in_range.gd" type="Script" id=3] [sub_resource type="ShaderMaterial" id=1] shader = ExtResource( 1 ) @@ -30,21 +30,28 @@ extents = Vector2( 4, 4 ) [node name="Snail" type="Node2D"] script = ExtResource( 3 ) +slower_speed = 10 [node name="AnimatedSprite" type="AnimatedSprite" parent="."] material = SubResource( 1 ) frames = SubResource( 4 ) -frame = 1 playing = true [node name="Area2D" type="Area2D" parent="."] -visible = false [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] position = Vector2( 0, 1 ) shape = SubResource( 5 ) -[node name="RayCast2D" type="RayCast2D" parent="."] +[node name="RayCast2D" type="RayCast2D" parent="Area2D"] +enabled = true cast_to = Vector2( 32, 0 ) +collide_with_areas = true +collide_with_bodies = false + +[node name="Timer" type="Timer" parent="."] +wait_time = 0.5 +one_shot = true [connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"] +[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/objects/player/player.gd b/objects/player/player.gd index d7e4cc1..9ce6b23 100644 --- a/objects/player/player.gd +++ b/objects/player/player.gd @@ -74,8 +74,6 @@ func _physics_process(delta): velocity.y = 0 #Apply velocity move_and_slide(velocity,Vector2.UP) - - Debug.print(get_owner().filename) func _process_idle(): if anims.get_current_animation() != "idle": anims.play("idle") @@ -94,7 +92,6 @@ func _process_walk(): for i in get_slide_count(): var collision = get_slide_collision(i) if collision.get_collider().is_in_group("pushable"): - print(collision.get_collider()) collision.get_collider().push(collision.normal) func _process_idle_walk():