From edbf4ba7c402992b9296bef999b846cf69304847 Mon Sep 17 00:00:00 2001 From: CaTronick Date: Sat, 5 Jul 2025 00:05:29 +0300 Subject: [PATCH 01/14] Added textures for zombies in assets/sprites/zombies and added stand animation for basic zombie --- assets/sprites/zombies/basic.png | Bin 0 -> 1320 bytes assets/sprites/zombies/basic.png.import | 34 ++++++++++++++++++ assets/sprites/zombies/basic_fem.png | Bin 0 -> 1942 bytes assets/sprites/zombies/basic_fem.png.import | 34 ++++++++++++++++++ assets/sprites/zombies/hobo.png | Bin 0 -> 3832 bytes assets/sprites/zombies/hobo.png.import | 34 ++++++++++++++++++ assets/sprites/zombies/polevaulter.png | Bin 0 -> 3332 bytes assets/sprites/zombies/polevaulter.png.import | 34 ++++++++++++++++++ assets/sprites/zombies/screendoor.png | Bin 0 -> 4739 bytes assets/sprites/zombies/screendoor.png.import | 34 ++++++++++++++++++ assets/sprites/zombies/screendoor_fem.png | Bin 0 -> 5057 bytes .../sprites/zombies/screendoor_fem.png.import | 34 ++++++++++++++++++ assets/sprites/zombies/Зондби.png | Bin 0 -> 2302 bytes assets/sprites/zombies/Зондби.png.import | 34 ++++++++++++++++++ .../animations/zombies/basic_zombie_walk.res | Bin 0 -> 6983 bytes 15 files changed, 238 insertions(+) create mode 100644 assets/sprites/zombies/basic.png create mode 100644 assets/sprites/zombies/basic.png.import create mode 100644 assets/sprites/zombies/basic_fem.png create mode 100644 assets/sprites/zombies/basic_fem.png.import create mode 100644 assets/sprites/zombies/hobo.png create mode 100644 assets/sprites/zombies/hobo.png.import create mode 100644 assets/sprites/zombies/polevaulter.png create mode 100644 assets/sprites/zombies/polevaulter.png.import create mode 100644 assets/sprites/zombies/screendoor.png create mode 100644 assets/sprites/zombies/screendoor.png.import create mode 100644 assets/sprites/zombies/screendoor_fem.png create mode 100644 assets/sprites/zombies/screendoor_fem.png.import create mode 100644 assets/sprites/zombies/Зондби.png create mode 100644 assets/sprites/zombies/Зондби.png.import create mode 100644 resources/animations/zombies/basic_zombie_walk.res diff --git a/assets/sprites/zombies/basic.png b/assets/sprites/zombies/basic.png new file mode 100644 index 0000000000000000000000000000000000000000..e25856a728630a1463904c7d38d15bc46d818aa9 GIT binary patch literal 1320 zcmV+@1=sqCP)Px#Hc(7dMJFdVLqkuNLQ{TzkN^Mc>sCv`!qH%0aEw1)x?xtZFkJtUW>+aoGATz# zJ9tZ5t3D$~0002Z4X^P4000tnQchF<|NsC0|NsC0|NsC0|NsC00OG&D5&!@Mf=NU{ zR9J>42-lt#wbNWH4 z*-l-p`#Scqq!lxf{EO7(x2W8@uLa%N9UVuG@~Z7Tuxh!|QNDGDSw{;y)4puszASfq zRrEolNE+-w$%3YGFBXk*rmIb~uj8d?IAZ7-l>U^_Os3{?FIHc_p+gzwAWa|qBS*8o zb@g7lA;qAJ-S#y+YE!dq+7mH)(-dda`%}S(w5+(;1T9|f{=P7-!0}715fK}ETd7h4Q-?r^kK{@W_$inyMrN<-PK#9ZtZ-Paz-w+&&Ogr!}U|9 z4}}h0#jjk+KYeb{_H(uM+~K1~bdagZ{)!$}sl6ohfo%L&q`poI`{W9kmSX=h_4UT7 zsp6GRc1y2DyQI+?d95^1a%w?4lYVvWBE4VuiGmZtI%i*+I>s& zvUygE_t+@)YsoQQ6;XB@0?|WDy&MOU5BZsuRK&xdShLt2^3(r{W_q0oP zO6}?(ZqT|b6H*~a{)JQv-`cqr+7}^S5 zQwuw`=U!==-UaQruRXs#M<;nJG~2sle5ZD>?fIS8@{v=!^QkwLn(cjmX7rg_rt8gZ zp-WJtv45`6Dzz;66Mt0d+K6_d#8aAx-1*eWF5|kog0szHQ+Z>7`2xw);l^e8G#{=I z@oPgX)7h=p;Xa7I#^Qgl<3VkWtnwU;WwGcKQ7p&>4;}68gAbs)Flx^K)FX!NT~kq- zG`S3tjJi=BU03S)TBjb+ZETzVd_0V4JGBv8kF9?}+o_EfX)(%V`3t%n z>p`a;J@Px+v2{Qjr+h;fE)G31HRzihxg%MAM?drUu5Cq&6H2E}x4!yjy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z*K4D=efO%?x(9kS?DtXuVr2l38}Q4PQ5+dx3s7EVJqXvz?Fc!WLu9vKUzJou5Ih@K z>P0dLKwyZlL4t50Lym?Dz$!bzY(S9z+-`k|^0-kBmKZ>;n^8qQ1YMq{^~k7Ov(tOc z5EcTMZ4%>EyMDA^OqeRi%*6Bjw2&gZR&JF;WouJeB4LIl-=jQH}SmljIlFGTKE z*bzf!XD7fSn6#Xa!DiJ8mhm)PGz-^^jdQ%338+d67DS4*0zU|GdHQ7_L@O3zb!Wan zZ|{e$8&W2Zneu>{fjIHpv2xHPn_|@qJ7iC3Gs9MSvcFgVnsJ`nw!(XD7}D4Po7BT9hG6RfITtI+lY?Y?c928xBE7@8OAvq6dt6dV5! X0thaXZNEt900000NkvXXu0mjfl?jJp literal 0 HcmV?d00001 diff --git a/assets/sprites/zombies/screendoor_fem.png.import b/assets/sprites/zombies/screendoor_fem.png.import new file mode 100644 index 0000000..07e1ed6 --- /dev/null +++ b/assets/sprites/zombies/screendoor_fem.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c5arkk8bthwbk" +path="res://.godot/imported/screendoor_fem.png-2ee7b01445eb11951dbc02e1dc4a467d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/zombies/screendoor_fem.png" +dest_files=["res://.godot/imported/screendoor_fem.png-2ee7b01445eb11951dbc02e1dc4a467d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/sprites/zombies/Зондби.png b/assets/sprites/zombies/Зондби.png new file mode 100644 index 0000000000000000000000000000000000000000..30d9fae1c7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&y8WHnYAnQ>0=ryWM^mldhc)Hm9T*!HSTrI+Q(K? zr<4@7EsOgyT=$r*pgW|gkbYlUkj1T6E zXpKygznCgZMdX(gJD&g0Axh;FgBGvQr?&$R><_GLjBRRSJTs0&X2=ALrS{X2*asAbsYkIeA+N6&=WUbUZIb6BKvPJW@ zIb;%)WC?!y{|a~~_g-{;^@}RU{NI%Gwn>tI9>dFos}um7>Z%ge6*)H$Z~yy{@$a)r zTgarQHl}oPa>DQIjMtq1diJ{GjnJWtwd;6nZ0+__H&Ql07?1}RPRKa%k?N1|;bCWO z1&5fknvTti(!-xp85q^AC%vn`h zn3w%Ppe~Y|@Nq28WI;$GRqHWBTbZ&nPU&S;`JWrp&vL8g-H#Auiq#vYw^#yA51}ew ze%l<(ern2xNJ-G+(kn-1uaT0z?sK}_;FyLZ3&p7fB8X)ov*3nlUJ-8PNGNMw zy~C-=lxq7QVpiQ{vw|n(d(n#}^i6pdBPg6r&)Zn7(AZRu!s(YX{k1JTc6D(d%5xBO z?)FIS{X^q{6N;_CLXk(S3hg<>i!U9HX69SCzH4V)n-UG_`s&O}yjfgrjMpSE0slh# EFH Date: Mon, 7 Jul 2025 00:41:02 +0300 Subject: [PATCH 02/14] added walking animation --- .../animations/zombies/basic_zombie_eating.res | Bin 0 -> 7031 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 resources/animations/zombies/basic_zombie_eating.res diff --git a/resources/animations/zombies/basic_zombie_eating.res b/resources/animations/zombies/basic_zombie_eating.res new file mode 100644 index 0000000000000000000000000000000000000000..24448b13df923e85de61ff0dbb97cbec929df583 GIT binary patch literal 7031 zcmb_>c|26_-}gDQ*|)K8#n@#hWE=Zl_9E*jB1=RlVl2tNXBSE+iM~koLDsCvlASEs zBC;gQeSE+De$RdX?&taMxnA?WKG$6HI&;pP^Ikr$*BG0qslfnfPy+xe900Iz04Rhu zn4vla)!R@#4^cpWHRnau&n5LOS2_yCFRr|1V_WTiPJ8`a(a%*fUn@Rlp)joLX$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tjC(`GZcm;n5sotx7wj70nUd4K1G^V_6PFuC~P><|-&JQN8L)mpz5 zG5-}a1FUXP)MZCD!yYLRBvDH9X=Jw7RcP7pcR(9O{>T{NKsG&9$g|56yp&AB!v3rc z@vEl!7kumU@V-Q_L8Iu@2;b1)FpFH!?R!B!;T1znQ!T61@Oe1OaVYry*PphbwhkuGnTQZXGlsfYrC|M^F zXS!lf#c!`s{cZIqr^X$Z=i zH8@mrXLIkhT1nQ4SbPplvTW&ilBZ+4llRM3h~xc^eugi~UUVC|f_HeGep)2fzqp^+ zxmA}&&NqLK<)XW)3bSwqy_zNCjbP=sp|tI*zkk%2?{2N93l(2!Q=_ERXn31pIC%T^ zIo)TUdI(HT65?W_?5}Gp>jghXbw?NGy=QRbCNM7OYf;mx*74N+r^_>ka3y?H@!Xg$DXHo_u)wu>j`m;o}=GjbgG#7&^10bE-@*0G;8fit&-RfhtbneG%cCOZgQnb zm;X^=L!x{brlM)2ZiVvBt?8ri-l5VOvB{}6m>cHI-aXSAQd6@m4IsB?t On~_<<@R5_l^MGL literal 0 HcmV?d00001 From d619685d026d990e705f99b235c7d6652b6e83a9 Mon Sep 17 00:00:00 2001 From: CaTronick Date: Mon, 7 Jul 2025 00:41:33 +0300 Subject: [PATCH 03/14] added standing animation --- .../animations/zombies/basic_zombie_stand.res | Bin 0 -> 6618 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 resources/animations/zombies/basic_zombie_stand.res diff --git a/resources/animations/zombies/basic_zombie_stand.res b/resources/animations/zombies/basic_zombie_stand.res new file mode 100644 index 0000000000000000000000000000000000000000..f83822ba9f003fac3bb8668d593af65b6961ddd2 GIT binary patch literal 6618 zcma)>Wmr^Q-}a{%hK8Y$8l<~R=@b-cDUp^C1P1|;7^F*(Qc5}{r9`?zIu#6BPy}ZP zM{3^9{a*L`JRhzP@0#OWYi7k>`)k8=GioKtMpE27wS!Adngq1hNAvo&lvh zP&QpQ0+I%lN(2IBfG!Z#dnUy| zpd~r9Bj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L`Xuol(^*fq zq>Gf&SOXsUIT}$K>o`rCgB5aY(@;>(eX_j4{I1C)^hhiM@72wC$dY>Wb1$!2OSbDe z_WpInE7T-Pw&qy9>n~Sm*;BS(dSjSt?@-?)!)KDpBx82}Fa>W)uZvJdwdOFdF;k?J z6XotlEoz{3IOR1|L}Yi^N%(CC8u_d!)!lsguBJ+L!{b@KGs+?4mY7=9=xPI-c(XT) zM5{z#a{b?8{hgpnA5*p9jfy?U*qHY&3kq5o0+|&!up|}x_)&8}*ekeal@3mAh-;R? z{;4S9%wh?6Lh0+gELY{@A$s@R+76Dy4&_o zM^PEJ#lQ5;6q1=gbzcjYvBksHw{I(H!^*bcz=nrf2P?B`znluMyIUUM=PPWgATMW4 z)bymp-IZT(JX>|##mPYrNxwBPFOGJ5Qtw^!zHp{efS*r9P|98+Ejb}3qK@IQ1#6miNHNXhDNVnxGM$U>&?rM7fvDuG3D52@2cR!&PjVljcx3x1m4uwngrR zVn1koX4|}$sS7q(i<;P|OH$ispm|Tb+Fy8fHnl`TaF!m955B0K8dii$eHqv Date: Mon, 7 Jul 2025 00:44:16 +0300 Subject: [PATCH 04/14] no comments --- .../animations/zombies/basic_zombie_stand.res | Bin 6618 -> 6620 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/resources/animations/zombies/basic_zombie_stand.res b/resources/animations/zombies/basic_zombie_stand.res index f83822ba9f003fac3bb8668d593af65b6961ddd2..a678c416c5e4fd07990abb591f21aba62e7c4ee7 100644 GIT binary patch delta 1874 zcmV-Y2d((pGu$%`Qd2`i0ssI201yBG6p;-h0h_TggA#wHFQrNFur?jcF9puPV=y_l zt)JBb`5fIGaWk+Yu>FT0fZ29WyZiq({!1ISA!GM_{y&&p-aaI!k$VoOui5Wh>w3=o z`F#9!RR@t2gaC;EmjD?kbcZ{*yoz)BZ{dGSy&)2Pn_G45;;IY^4a^E=<|prN%^+=S z^TIlmvtWO<`5$0J&R0Jh8&hBQrXXk{LV);RB0UrEXEdvsXCFG(4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0 zql}pd6{I9-Vc35Is2_3+I$}CvgW$)S`;`Q`)Oujxa}a_n|8wTpj6p1h-SE$$?m$uVpApR8xGM;jMeB7E`i<6VMF zq&B(3_DVF7Za}1NW5I9pBSSk`Ta71-yM!|Aix)w;ip>4EIVHXv4*G1lzn@}F1u77_ zf7C$8-H(g+({BSKJ0M-&xZ07HLCAtj1=km83YukpdbKPK>w!OO-8_q|UO53^Xx+y+GWoRDF#{kgn^ z|0JIun)Bv3^cHF4h`g=;IWA5<3bN0hP07E?+X*D1&g|UX@&!D?1{-B;Q1tP5+r8Kp z!gwK!?#a)VE2+GH`bV<6_`QFR7JpjL+#tK}KUn@Iv!84Jb1N;VoeL3YxcGnd4f1Pn zq8DW&N+x0(*S7(*^)cATV_0auR%m&RUl{zsz%phtJKbSEQ|Gr$Im9B`JX0t{JzuOZ6evmG$Da2heWF?x`(`J_wfe5!F&L4D+@?gGrr zaO@f(1EPKc(<$>=3NL@y*hIxFZhgVw6b2Ab^0qbc_o<^Gni_#gl?QXbAxlS>s6Zzr z1-On|Ul@D9nRrCyzHp;Pom45e7>l<070pqRqaVxR5J2k5)2hy7UAz0Fs zpb2v6@$u&BB_e;r?_M%o939qT9ry!VeLfsUm(YW-U8s0=bSzXkI5%4bwRxp#XecVp zn?TKGWMWDZ73Rg&Fmq{nv2d=sqSC4f&`Y3*n8GvH|_}JOU3JrZ=S@o4e66`i}+CeDD1%pq}SyVER%ck zuO{ Date: Mon, 7 Jul 2025 16:37:34 +0500 Subject: [PATCH 05/14] new entity --- scripts/components/Entity.cs | 120 +++++++++++++++++++++++++++++++ scripts/components/Entity.cs.uid | 1 + 2 files changed, 121 insertions(+) create mode 100644 scripts/components/Entity.cs create mode 100644 scripts/components/Entity.cs.uid diff --git a/scripts/components/Entity.cs b/scripts/components/Entity.cs new file mode 100644 index 0000000..6681d17 --- /dev/null +++ b/scripts/components/Entity.cs @@ -0,0 +1,120 @@ +using Godot; +using Godot.Collections; +using Newlon.Systems.Effects; + +namespace Newlon.Components; + +public partial class Entity : Node2D +{ + #region Health points + [Export] public float MaxHP { get; private set; } + public float HP { get; private set; } + [Signal] public delegate void OnHPChangedEventHandler(int deltaHP, Node origin); + [Signal] public delegate void OnDamagedEventHandler(); + + public virtual void TakeDamage(float amount, Node origin) + { + HP -= amount; + if (HP <= 0) + { + + } + } + + public virtual void Heal(float amount, Node origin) + { + HP += amount; + } + + public virtual void Kill() + { + QueueFree(); + } + + + #endregion + #region Brain + public virtual void DisableBrain() + { + GetNode("AnimationPlayer").ProcessMode = ProcessModeEnum.Pausable; + ProcessMode = ProcessModeEnum.Disabled; + } + + public virtual void EnableBrain() + { + GetNode("AnimationPlayer").ProcessMode = ProcessModeEnum.Inherit; + ProcessMode = ProcessModeEnum.Inherit; + } + #endregion + #region Effects + [Export] private Array _effectImmunities; + private readonly Effect[] _activeEffectSlots = new Effect[Utility.EffectSlotCount]; + private readonly Timer[] _effectSlotTimers = new Timer[Utility.EffectSlotCount]; + + public virtual void GiveEffect(Effect what) + { + if (_effectImmunities.Contains(what)) + { + return; + } + int slot = (int)what.Slot; + if (_activeEffectSlots[slot] != null) + { + _effectSlotTimers[slot].Stop(); + _activeEffectSlots[slot].Exit(this); + } + _effectSlotTimers[slot].WaitTime = what.Duration; + _effectSlotTimers[slot].Start(); + + what.Enter(this); + _activeEffectSlots[slot] = what; + } + + public void EndEffect(Effect what) + { + what.Exit(this); + _activeEffectSlots[(int)what.Slot] = null; + } + + public void ProcessEffects() + { + for (int i = 0; i < Utility.EffectSlotCount; i++) + _activeEffectSlots[i]?.Process(this); + } + + private void EndEffectAtSlot(int slot) + { + _activeEffectSlots[slot].Exit(this); + _activeEffectSlots[slot] = null; + } + #endregion + #region LocalTimescale + private float _localTimescale = 1.0f; + [Signal] public delegate void OnLocalTimescaleChangedEventHandler(float scale); + public float LocalTimescale + { + get => _localTimescale; + set + { + _localTimescale = value; + EmitSignal(SignalName.OnLocalTimescaleChanged, _localTimescale); + } + } + #endregion + #region Godot overrides + public override void _Ready() + { + HP = MaxHP; + + // Effect timers setup + for(int i = 0; i < Utility.EffectSlotCount; i++) + { + var timer = new Timer() {Autostart = false, OneShot = true}; + _effectSlotTimers[i] = timer; + AddChild(timer); + int current_index = i; + timer.Timeout += () => {EndEffectAtSlot(current_index);}; + } + } + #endregion +} diff --git a/scripts/components/Entity.cs.uid b/scripts/components/Entity.cs.uid new file mode 100644 index 0000000..c9ca417 --- /dev/null +++ b/scripts/components/Entity.cs.uid @@ -0,0 +1 @@ +uid://3tw88wj1nrj1 From 6c9909df30f61c7a0f261180aa67993f98ca9b53 Mon Sep 17 00:00:00 2001 From: Rendo Date: Mon, 7 Jul 2025 16:39:25 +0500 Subject: [PATCH 06/14] entity hp fix --- scripts/components/Entity.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/components/Entity.cs b/scripts/components/Entity.cs index 6681d17..2ef34ec 100644 --- a/scripts/components/Entity.cs +++ b/scripts/components/Entity.cs @@ -15,14 +15,17 @@ public partial class Entity : Node2D public virtual void TakeDamage(float amount, Node origin) { HP -= amount; + EmitSignal(SignalName.OnHPChanged, -amount, origin); + EmitSignal(SignalName.OnDamaged); if (HP <= 0) { - + Kill(); } } public virtual void Heal(float amount, Node origin) { + EmitSignal(SignalName.OnHPChanged, amount, origin); HP += amount; } From 08d593175bb29f63b9a9e659c54ccd484aca7a07 Mon Sep 17 00:00:00 2001 From: Rendo Date: Mon, 7 Jul 2025 16:55:48 +0500 Subject: [PATCH 07/14] Plants now based on entity class --- scenes/entities/plants/aloe.tscn | 2 + scenes/entities/plants/garlic.tscn | 3 +- scenes/entities/plants/peashooter.tscn | 2 + scenes/entities/plants/potato_mine.tscn | 3 +- scenes/entities/plants/spikeweed.tscn | 2 + scenes/entities/plants/sunflower.tscn | 5 +- scenes/entities/plants/wallnut.tscn | 4 +- scripts/components/Entity.cs | 7 ++- scripts/components/level/PoolContainer.cs | 4 +- scripts/components/plants/LoseZone.cs | 7 ++- scripts/components/plants/ReturnEffect.cs | 1 + scripts/components/plants/RuntimePlantData.cs | 57 ++----------------- .../plants/behaviours/AloeBehaviour.cs | 4 +- .../plants/behaviours/HpBasedBehaviour.cs | 2 +- 14 files changed, 38 insertions(+), 65 deletions(-) diff --git a/scenes/entities/plants/aloe.tscn b/scenes/entities/plants/aloe.tscn index c4c75a4..00dfc9e 100644 --- a/scenes/entities/plants/aloe.tscn +++ b/scenes/entities/plants/aloe.tscn @@ -84,6 +84,8 @@ graph_offset = Vector2(-78.082, -71.7578) size = Vector2(22, 32) [node name="Aloe" instance=ExtResource("1_n25yi")] +MaxHP = 30.0 +_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] position = Vector2(9, -14) diff --git a/scenes/entities/plants/garlic.tscn b/scenes/entities/plants/garlic.tscn index 67c316e..bd855b0 100644 --- a/scenes/entities/plants/garlic.tscn +++ b/scenes/entities/plants/garlic.tscn @@ -50,7 +50,8 @@ blend_mode = 1 size = Vector2(32, 29) [node name="Garlic" instance=ExtResource("1_5i0e6")] -_maxHP = 200 +MaxHP = 200.0 +_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_w2jbi") diff --git a/scenes/entities/plants/peashooter.tscn b/scenes/entities/plants/peashooter.tscn index 7ba01a0..edf0cfe 100644 --- a/scenes/entities/plants/peashooter.tscn +++ b/scenes/entities/plants/peashooter.tscn @@ -62,6 +62,8 @@ resource_local_to_scene = true size = Vector2(20, 44) [node name="Peashooter" instance=ExtResource("1_pyk3o")] +MaxHP = 30.0 +_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_14qlx") diff --git a/scenes/entities/plants/potato_mine.tscn b/scenes/entities/plants/potato_mine.tscn index 03dee1e..c53e617 100644 --- a/scenes/entities/plants/potato_mine.tscn +++ b/scenes/entities/plants/potato_mine.tscn @@ -68,7 +68,8 @@ size = Vector2(15, 27) size = Vector2(34, 19) [node name="Potato mine" instance=ExtResource("1_dj7ul")] -_maxHP = 20 +MaxHP = 20.0 +_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_sneas") diff --git a/scenes/entities/plants/spikeweed.tscn b/scenes/entities/plants/spikeweed.tscn index 9b96cff..d44984d 100644 --- a/scenes/entities/plants/spikeweed.tscn +++ b/scenes/entities/plants/spikeweed.tscn @@ -26,6 +26,8 @@ blend_mode = 1 size = Vector2(49, 38) [node name="Spikeweed" instance=ExtResource("1_vmbvr")] +MaxHP = 30.0 +_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_ffrjr") diff --git a/scenes/entities/plants/sunflower.tscn b/scenes/entities/plants/sunflower.tscn index 2f23a96..045bc2f 100644 --- a/scenes/entities/plants/sunflower.tscn +++ b/scenes/entities/plants/sunflower.tscn @@ -55,13 +55,14 @@ transitions = ["Start", "sunflower_idle", SubResource("AnimationNodeStateMachine size = Vector2(26, 48) [node name="Sunflower" instance=ExtResource("1_bikjn")] -_maxHP = 30 +MaxHP = 30.0 +_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_fwcda") hframes = 9 vframes = 2 -frame = 1 +frame = 4 [node name="AnimationPlayer" parent="." index="1"] libraries = { diff --git a/scenes/entities/plants/wallnut.tscn b/scenes/entities/plants/wallnut.tscn index 84a0d9e..dc796e0 100644 --- a/scenes/entities/plants/wallnut.tscn +++ b/scenes/entities/plants/wallnut.tscn @@ -28,12 +28,14 @@ blend_mode = 1 size = Vector2(33, 46) [node name="Wallnut" instance=ExtResource("1_fluxn")] -_maxHP = 600 +MaxHP = 600.0 +_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_o5tda") hframes = 12 vframes = 3 +frame = 3 [node name="AnimationPlayer" parent="." index="1"] libraries = { diff --git a/scripts/components/Entity.cs b/scripts/components/Entity.cs index 2ef34ec..121bded 100644 --- a/scripts/components/Entity.cs +++ b/scripts/components/Entity.cs @@ -19,7 +19,7 @@ public partial class Entity : Node2D EmitSignal(SignalName.OnDamaged); if (HP <= 0) { - Kill(); + KillByDamage(); } } @@ -29,6 +29,11 @@ public partial class Entity : Node2D HP += amount; } + public virtual void KillByDamage() + { + Kill(); + } + public virtual void Kill() { QueueFree(); diff --git a/scripts/components/level/PoolContainer.cs b/scripts/components/level/PoolContainer.cs index 2714860..b5765fd 100644 --- a/scripts/components/level/PoolContainer.cs +++ b/scripts/components/level/PoolContainer.cs @@ -23,12 +23,12 @@ public partial class PoolContainer : Node2D public static PoolContainer Instance { get; private set; } - public Dictionary[] EntityField = { new(), new(), new() }; + public Dictionary[] EntityField = { new(), new(), new() }; public override void _Ready() { Instance = this; } - public bool TryGetEntity(Vector2 key, out IEntity result, int layer = 1) + public bool TryGetEntity(Vector2 key, out Entity result, int layer = 1) { if (EntityField[layer].ContainsKey(key)) { diff --git a/scripts/components/plants/LoseZone.cs b/scripts/components/plants/LoseZone.cs index 53e71fa..18ab886 100644 --- a/scripts/components/plants/LoseZone.cs +++ b/scripts/components/plants/LoseZone.cs @@ -4,10 +4,11 @@ namespace Newlon.Components.Plants; public partial class LoseZone : RuntimePlantData { - public override void TakeDamage(int amount, Node origin, Utility.DamageTypes damageType = Utility.DamageTypes.PHYSICAL) - { + public override void TakeDamage(float amount, Node origin) + { + + } - } public override void Kill() { diff --git a/scripts/components/plants/ReturnEffect.cs b/scripts/components/plants/ReturnEffect.cs index 149e8b5..c481de1 100644 --- a/scripts/components/plants/ReturnEffect.cs +++ b/scripts/components/plants/ReturnEffect.cs @@ -11,6 +11,7 @@ public partial class ReturnEffect : Node public void OnDamageRecieved(int delta,Node origin) { + if (delta >= 0) return; if (origin is RuntimeZombieData zombie) { zombie.GiveEffect(_effectToReturn); diff --git a/scripts/components/plants/RuntimePlantData.cs b/scripts/components/plants/RuntimePlantData.cs index ce189c5..6968e5d 100644 --- a/scripts/components/plants/RuntimePlantData.cs +++ b/scripts/components/plants/RuntimePlantData.cs @@ -7,64 +7,19 @@ namespace Newlon.Components.Plants; // Data that plant stores during runtime // -public partial class RuntimePlantData : Node2D, IEntity +public partial class RuntimePlantData : Entity { - [Export] - private int _maxHP; - private int _hp; - public int Hp => _hp; - public int MaxHp => _maxHP; public int Line { get; set; } public PlantResource Resource; - - private AudioStream eatenSound; - - [Signal] - public delegate void OnHPChangedEventHandler(int amount, Node origin); - - public override void _Ready() + private AudioStream eatenSound = ResourceLoader.Load("res://assets/audio/sfx/gulp.mp3"); + public override void KillByDamage() { - _hp = _maxHP; - eatenSound = ResourceLoader.Load("res://assets/audio/sfx/gulp.mp3"); + AudioSequencer.Play("plant_eaten", eatenSound); + base.KillByDamage(); } - - public virtual void Heal(int amount, Node origin) - { - _hp += amount; - - EmitSignal(SignalName.OnHPChanged, amount, origin); - - if (MaxHp > 0) - { - _hp = MaxHp; - } - } - - public virtual void TakeDamage(int amount, Node origin, Utility.DamageTypes damageType = Utility.DamageTypes.PHYSICAL) - { - _hp -= amount; - - EmitSignal(SignalName.OnHPChanged, -amount, origin); - - if (_hp <= 0) - { - Kill(); - AudioSequencer.Play("plant_eaten", eatenSound); - } - } - public virtual void Kill() + public override void Kill() { PoolContainer.Instance.EntityField[Resource.Layer].Remove(GlobalPosition); QueueFree(); } - - public virtual void DisableBrain() - { - GetNode("Behaviour").ProcessMode = ProcessModeEnum.Disabled; - } - - public virtual void EnableBrain() - { - GetNode("Behaviour").ProcessMode = ProcessModeEnum.Inherit; - } } diff --git a/scripts/components/plants/behaviours/AloeBehaviour.cs b/scripts/components/plants/behaviours/AloeBehaviour.cs index 323f8ab..f9dde56 100644 --- a/scripts/components/plants/behaviours/AloeBehaviour.cs +++ b/scripts/components/plants/behaviours/AloeBehaviour.cs @@ -22,7 +22,7 @@ public partial class AloeBehaviour : BaseBehaviour var checkPos = GetParent().GlobalPosition + Vector2.Right * Utility.TileWidth; if(_charge && PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData)) { - if((float)plantData.Hp / (float)plantData.MaxHp < _hpTreshold) + if((float)plantData.HP / (float)plantData.MaxHP < _hpTreshold) { _charge = false; _tree.Set("parameters/conditions/heal",true); @@ -36,7 +36,7 @@ public partial class AloeBehaviour : BaseBehaviour var checkPos = GetParent().GlobalPosition + Vector2.Right * Utility.TileWidth; if (PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData)) { - plantData.Heal(3000 + 25 * plantData.MaxHp, GetParent()); + plantData.Heal(3000 + 25 * plantData.MaxHP, GetParent()); } } diff --git a/scripts/components/plants/behaviours/HpBasedBehaviour.cs b/scripts/components/plants/behaviours/HpBasedBehaviour.cs index d49af31..a234287 100644 --- a/scripts/components/plants/behaviours/HpBasedBehaviour.cs +++ b/scripts/components/plants/behaviours/HpBasedBehaviour.cs @@ -13,6 +13,6 @@ public partial class HpBasedBehaviour : BaseBehaviour public void OnHPChanged(int amount,Node origin) { - _tree.Set("parameters/blend_position",(float)_data.Hp/_data.MaxHp); + _tree.Set("parameters/blend_position",(float)_data.HP/_data.MaxHP); } } From 63930450a3890403297e3a8bb4109fcb18f5ee5c Mon Sep 17 00:00:00 2001 From: Rendo Date: Mon, 7 Jul 2025 17:29:10 +0500 Subject: [PATCH 08/14] Effects handling rework --- project.godot | 2 +- resources/effects/GarlicEffect.tres | 2 +- resources/effects/SnowSlow.tres | 4 +- scenes/entities/Zombies/zombie.tscn | 2 +- scenes/entities/plants/peashooter.tscn | 1 - scenes/projectiles/snowpea_projectile.tscn | 1 - scripts/components/Armor.cs | 14 +- scripts/components/DegradingSprite.cs | 4 +- scripts/components/Entity.cs | 67 +++++--- scripts/components/IEntity.cs | 17 -- scripts/components/IEntity.cs.uid | 1 - scripts/components/ILocalTimescale.cs | 6 - scripts/components/ILocalTimescale.cs.uid | 1 - scripts/components/LinearProjectile.cs | 10 +- .../gui/choose_your_seeds/Previewport.cs | 2 +- scripts/components/plants/Eyesight.cs | 6 +- .../components/zombies/RuntimeZombieData.cs | 160 +++--------------- scripts/systems/effects/Effect.cs | 2 +- scripts/systems/effects/IEffectHandler.cs | 8 - scripts/systems/effects/IEffectHandler.cs.uid | 1 - scripts/systems/effects/SlownessEffect.cs | 17 +- 21 files changed, 100 insertions(+), 228 deletions(-) delete mode 100644 scripts/components/IEntity.cs delete mode 100644 scripts/components/IEntity.cs.uid delete mode 100644 scripts/components/ILocalTimescale.cs delete mode 100644 scripts/components/ILocalTimescale.cs.uid delete mode 100644 scripts/systems/effects/IEffectHandler.cs delete mode 100644 scripts/systems/effects/IEffectHandler.cs.uid diff --git a/project.godot b/project.godot index 0ada405..6e1d07c 100644 --- a/project.godot +++ b/project.godot @@ -22,7 +22,7 @@ config/windows_native_icon="res://icon.ico" LevelController="*res://scripts/LevelController.cs" Cursor="*res://scripts/Cursor.cs" GameRegistry="*res://scripts/systems/GameRegistry.cs" -Cheats="res://scripts/debug/Cheats.cs" +Cheats="*res://scripts/debug/Cheats.cs" AudioSequencer="*res://scenes/audio_sequencer.tscn" [display] diff --git a/resources/effects/GarlicEffect.tres b/resources/effects/GarlicEffect.tres index 374c2cd..5c9f170 100644 --- a/resources/effects/GarlicEffect.tres +++ b/resources/effects/GarlicEffect.tres @@ -5,4 +5,4 @@ [resource] script = ExtResource("1_rfumy") Duration = 0.25 -Slot = 3 +Slot = "garlic" diff --git a/resources/effects/SnowSlow.tres b/resources/effects/SnowSlow.tres index 5851046..5a62fd5 100644 --- a/resources/effects/SnowSlow.tres +++ b/resources/effects/SnowSlow.tres @@ -1,10 +1,10 @@ [gd_resource type="Resource" load_steps=2 format=3 uid="uid://7uj0oe656jfx"] -[ext_resource type="Script" path="res://scripts/systems/effects/SlownessEffect.cs" id="1_8md01"] +[ext_resource type="Script" uid="uid://dyc7fc5bfkdii" path="res://scripts/systems/effects/SlownessEffect.cs" id="1_8md01"] [resource] script = ExtResource("1_8md01") ColorOverride = Color(0, 1, 1, 1) Multiplier = 0.75 Duration = 3.25 -Slot = 0 +Slot = "freeze_slow" diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn index 82685a4..579b17c 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -66,9 +66,9 @@ mult_value = 1.0 [node name="Zombie" type="Node2D"] y_sort_enabled = true script = ExtResource("1_qq3f1") -_maxHP = 70 garlicSound = ExtResource("2_hh4qh") freezeSound = ExtResource("3_ltj46") +MaxHP = 70.0 [node name="CanvasGroup" type="CanvasGroup" parent="."] material = SubResource("ShaderMaterial_63ls2") diff --git a/scenes/entities/plants/peashooter.tscn b/scenes/entities/plants/peashooter.tscn index edf0cfe..d9661db 100644 --- a/scenes/entities/plants/peashooter.tscn +++ b/scenes/entities/plants/peashooter.tscn @@ -63,7 +63,6 @@ size = Vector2(20, 44) [node name="Peashooter" instance=ExtResource("1_pyk3o")] MaxHP = 30.0 -_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_14qlx") diff --git a/scenes/projectiles/snowpea_projectile.tscn b/scenes/projectiles/snowpea_projectile.tscn index 001c48a..bfde097 100644 --- a/scenes/projectiles/snowpea_projectile.tscn +++ b/scenes/projectiles/snowpea_projectile.tscn @@ -18,7 +18,6 @@ script = ExtResource("1_fkydi") _speed = 3.0 _damage = 10 _impactEffect = ExtResource("2_fn62x") -_damageType = 1 particles = ExtResource("3_t6hp0") [node name="Sprite" type="Sprite2D" parent="."] diff --git a/scripts/components/Armor.cs b/scripts/components/Armor.cs index 4326ff0..7e8ba22 100644 --- a/scripts/components/Armor.cs +++ b/scripts/components/Armor.cs @@ -6,13 +6,13 @@ namespace Newlon.Components; public partial class Armor : Node { [Signal] - public delegate void ArmorDamagedEventHandler(int hp); + public delegate void ArmorDamagedEventHandler(float hp); [Signal] public delegate void ArmorLostEventHandler(); [Export] - public int MaxHP { get; private set; } - private int _hp; + public float MaxHP { get; private set; } + private float _hp; private bool _lost = false; public override void _Ready() @@ -20,11 +20,11 @@ public partial class Armor : Node _hp = MaxHP; } - public int RecieveDamage(int damage) + public float RecieveDamage(float damage) { if(_lost) return damage; - int returnAmount = 0; + float returnAmount = 0; _hp -= damage; if(_hp <= 0) { @@ -37,11 +37,11 @@ public partial class Armor : Node return returnAmount; } - public int Heal(int amount) + public float Heal(float amount) { if(_lost) return amount; - int returnAmount = 0; + float returnAmount = 0; _hp += amount; if (_hp >= MaxHP) { diff --git a/scripts/components/DegradingSprite.cs b/scripts/components/DegradingSprite.cs index baa5e8f..3c28adc 100644 --- a/scripts/components/DegradingSprite.cs +++ b/scripts/components/DegradingSprite.cs @@ -14,9 +14,9 @@ public partial class DegradingSprite : Sprite2D armor.ArmorDamaged += OnZombieHPChanged; } - private void OnZombieHPChanged(int hp) + private void OnZombieHPChanged(float hp) { - float percent = (float)hp / (float)armor.MaxHP; + float percent = hp / armor.MaxHP; for (int i = 0; i < degradationStages.Count; i++) { if (percent <= thresholdPercentage[i]) diff --git a/scripts/components/Entity.cs b/scripts/components/Entity.cs index 121bded..f4d181a 100644 --- a/scripts/components/Entity.cs +++ b/scripts/components/Entity.cs @@ -7,8 +7,8 @@ namespace Newlon.Components; public partial class Entity : Node2D { #region Health points - [Export] public float MaxHP { get; private set; } - public float HP { get; private set; } + [Export] public float MaxHP; + public float HP; [Signal] public delegate void OnHPChangedEventHandler(int deltaHP, Node origin); [Signal] public delegate void OnDamagedEventHandler(); @@ -55,9 +55,14 @@ public partial class Entity : Node2D } #endregion #region Effects - [Export] private Array _effectImmunities; - private readonly Effect[] _activeEffectSlots = new Effect[Utility.EffectSlotCount]; - private readonly Timer[] _effectSlotTimers = new Timer[Utility.EffectSlotCount]; + [Export] private Array _effectImmunities = new(); + private readonly Dictionary _activeEffectSlots = new(); + private readonly Dictionary _effectSlotTimers = new(); + + [Signal] public delegate void EffectStartedEventHandler(Effect what); + [Signal] public delegate void EffectEndedEventHandler(Effect what); + [Signal] public delegate void EffectContinuedEventHandler(Effect what); + public virtual void GiveEffect(Effect what) { @@ -65,7 +70,22 @@ public partial class Entity : Node2D { return; } - int slot = (int)what.Slot; + + string slot = what.Slot; + if (_activeEffectSlots.ContainsKey(slot) == false) + { + InitSlot(slot); + } + + if (what == _activeEffectSlots[slot]) + { + EmitSignal(SignalName.EffectContinued, what); + } + else + { + EmitSignal(SignalName.EffectStarted, what); + } + if (_activeEffectSlots[slot] != null) { _effectSlotTimers[slot].Stop(); @@ -76,24 +96,39 @@ public partial class Entity : Node2D what.Enter(this); _activeEffectSlots[slot] = what; + + } + + private void InitSlot(string key) + { + _activeEffectSlots.Add(key, null); + + var timer = new Timer() { Autostart = false, OneShot = true }; + AddChild(timer); + timer.Timeout += () => { EndEffectAtSlot(key); }; + + _effectSlotTimers.Add(key, timer); + } public void EndEffect(Effect what) { - what.Exit(this); - _activeEffectSlots[(int)what.Slot] = null; + EndEffectAtSlot(what.Slot); } public void ProcessEffects() { - for (int i = 0; i < Utility.EffectSlotCount; i++) - _activeEffectSlots[i]?.Process(this); + foreach(string key in _activeEffectSlots.Keys) + _activeEffectSlots[key]?.Process(this); } - private void EndEffectAtSlot(int slot) + private void EndEffectAtSlot(string slot) { _activeEffectSlots[slot].Exit(this); _activeEffectSlots[slot] = null; + + EmitSignal(SignalName.EffectEnded, _activeEffectSlots[slot]); + } #endregion #region LocalTimescale @@ -113,16 +148,6 @@ public partial class Entity : Node2D public override void _Ready() { HP = MaxHP; - - // Effect timers setup - for(int i = 0; i < Utility.EffectSlotCount; i++) - { - var timer = new Timer() {Autostart = false, OneShot = true}; - _effectSlotTimers[i] = timer; - AddChild(timer); - int current_index = i; - timer.Timeout += () => {EndEffectAtSlot(current_index);}; - } } #endregion } diff --git a/scripts/components/IEntity.cs b/scripts/components/IEntity.cs deleted file mode 100644 index 7446c70..0000000 --- a/scripts/components/IEntity.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Godot; - -namespace Newlon.Components; - -// -// Base interface for entities -// -public interface IEntity -{ - public int Hp { get; } - public int MaxHp { get; } - public void TakeDamage(int amount, Node origin, Utility.DamageTypes damageType = Utility.DamageTypes.PHYSICAL); - public void Heal(int amount, Node origin); - public void DisableBrain(); - public void EnableBrain(); -} - \ No newline at end of file diff --git a/scripts/components/IEntity.cs.uid b/scripts/components/IEntity.cs.uid deleted file mode 100644 index c16d5f4..0000000 --- a/scripts/components/IEntity.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cjdeq452vk2ll diff --git a/scripts/components/ILocalTimescale.cs b/scripts/components/ILocalTimescale.cs deleted file mode 100644 index e60865a..0000000 --- a/scripts/components/ILocalTimescale.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Newlon.Components; - -public interface ILocalTimescale -{ - public float LocalTimescale { get; set; } -} \ No newline at end of file diff --git a/scripts/components/ILocalTimescale.cs.uid b/scripts/components/ILocalTimescale.cs.uid deleted file mode 100644 index 48a6d9b..0000000 --- a/scripts/components/ILocalTimescale.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bxu6ljkmmlgd5 diff --git a/scripts/components/LinearProjectile.cs b/scripts/components/LinearProjectile.cs index 156c486..f9ad5c0 100644 --- a/scripts/components/LinearProjectile.cs +++ b/scripts/components/LinearProjectile.cs @@ -17,8 +17,6 @@ public partial class LinearProjectile : Area2D, IProjectile [Export] private Effect _impactEffect; [Export] - private Utility.DamageTypes _damageType = Utility.DamageTypes.PHYSICAL; - [Export] private PackedScene particles; private int _line; private bool used = false; @@ -33,13 +31,13 @@ public partial class LinearProjectile : Area2D, IProjectile public void OnAreaEntered(Area2D area) { if (used == true) return; - var entity = area.GetParent(); + var entity = area.GetParent(); if (entity != null) { - entity.TakeDamage(_damage,this,_damageType); + entity.TakeDamage(_damage,this); used = true; - if (entity is IEffectHandler effectHandler && _impactEffect != null) - effectHandler.GiveEffect(_impactEffect); + if (_impactEffect != null) + entity.GiveEffect(_impactEffect); PoolContainer.Instance.SpawnParticles(particles, GlobalPosition); diff --git a/scripts/components/gui/choose_your_seeds/Previewport.cs b/scripts/components/gui/choose_your_seeds/Previewport.cs index bb90799..71a1709 100644 --- a/scripts/components/gui/choose_your_seeds/Previewport.cs +++ b/scripts/components/gui/choose_your_seeds/Previewport.cs @@ -44,7 +44,7 @@ public partial class Previewport : SubViewport title.Text = Tr(resource.name_key); description.Text = Tr(resource.description_key); AddChild(current_display); - if (current_display is IEntity entity) + if (current_display is Entity entity) entity.DisableBrain(); } diff --git a/scripts/components/plants/Eyesight.cs b/scripts/components/plants/Eyesight.cs index 7922358..2480476 100644 --- a/scripts/components/plants/Eyesight.cs +++ b/scripts/components/plants/Eyesight.cs @@ -7,7 +7,7 @@ public partial class Eyesight : Area2D { private bool _enemyDetected; public bool EnemyDetected => _enemyDetected; - private readonly List _detectedEntities = new List(); + private readonly List _detectedEntities = new List(); private RuntimePlantData _plantData; public override void _Ready() @@ -19,7 +19,7 @@ public partial class Eyesight : Area2D public void OnAreaEntered(Area2D area) { - var entity = area.GetParent(); + var entity = area.GetParent(); if (entity != null) { _detectedEntities.Add(entity); @@ -30,7 +30,7 @@ public partial class Eyesight : Area2D public void OnAreaExited(Area2D area) { - var entity = area.GetParent(); + var entity = area.GetParent(); if (entity != null) { if (_detectedEntities.Contains(entity)) diff --git a/scripts/components/zombies/RuntimeZombieData.cs b/scripts/components/zombies/RuntimeZombieData.cs index e0fcef0..bf4a64a 100644 --- a/scripts/components/zombies/RuntimeZombieData.cs +++ b/scripts/components/zombies/RuntimeZombieData.cs @@ -1,162 +1,48 @@ -using System.Collections.Generic; using Godot; -using Newlon.Systems.Effects; namespace Newlon.Components.Zombies; -public partial class RuntimeZombieData : Node2D, IEntity, ILocalTimescale, IEffectHandler +public partial class RuntimeZombieData : Entity { - [Signal] - public delegate void OnHPChangedEventHandler(int deltaHP, Node origin); - [Signal] - public delegate void OnDamagedEventHandler(); - - [Signal] - public delegate void OnLocalTimescaleChangedEventHandler(int currentTimescale); - - [Export] - private int _hp; - [Export] - private int _maxHP; [Export] private Armor _armor; - [Export] private AudioStream garlicSound; [Export] private AudioStream freezeSound; - - - private float _localTimescale = 1.0f; - public int Hp => _hp; - - public int MaxHp => _maxHP; - public bool AbleToEat = true; - public float LocalTimescale - { - get => _localTimescale; - set - { - _localTimescale = value; - EmitSignal(SignalName.OnLocalTimescaleChanged,_localTimescale); - } - } - - public override void _Ready() - { - _hp = _maxHP; - - // Effect timers setup - for(int i = 0; i < Utility.EffectSlotCount; i++) - { - var timer = new Timer() {Autostart = false, OneShot = true}; - _effectSlotTimers[i] = timer; - AddChild(timer); - int current_index = i; - timer.Timeout += () => {EndEffectAtSlot(current_index);}; - } - } - - public void Heal(int amount,Node origin) - { - if(_armor != null) - { - _hp += _armor.Heal(amount); - } - else - _hp += amount; - EmitSignal(SignalName.OnHPChanged,amount,origin); - - if (MaxHp > 0) - { - _hp = MaxHp; - } - } - - public void TakeDamage(int amount, Node origin, Utility.DamageTypes damageType = Utility.DamageTypes.PHYSICAL) + public override void Heal(float amount, Node origin) { if (_armor != null) { - _hp -= _armor.RecieveDamage(amount); + HP += _armor.Heal(amount); } else - _hp -= amount; - EmitSignal(SignalName.OnHPChanged,-amount, origin); + HP += amount; + EmitSignal(SignalName.OnHPChanged, amount, origin); + + if (HP > MaxHP) + { + HP = MaxHP; + } + } + + public override void TakeDamage(float amount, Node origin) + { + if (_armor != null) + { + HP -= _armor.RecieveDamage(amount); + } + else + HP -= amount; + EmitSignal(SignalName.OnHPChanged, -amount, origin); EmitSignal(SignalName.OnDamaged); - if (_hp <= 0) + if (HP <= 0) { - QueueFree(); + KillByDamage(); } } - #region Effects system - private readonly Effect[] _activeEffectSlots = new Effect[Utility.EffectSlotCount]; - private readonly Timer[] _effectSlotTimers = new Timer[Utility.EffectSlotCount]; - - // Effect handling - - public void GiveEffect(Effect what) - { - int slot = (int)what.Slot; - if (_activeEffectSlots[slot] == null) - { - switch (what.Slot) - { - case Utility.EffectSlots.FREEZE: - AudioSequencer.Play("zombie_freeze", freezeSound); - var settings = new ChannelSettings(); - settings.restartTreshold = -1; - AudioSequencer.ChangeSettings("zombie_freeze",settings); - break; - case Utility.EffectSlots.GARLIC: - AudioSequencer.Play("zombie_garlic", garlicSound); - - break; - } - } - if (_activeEffectSlots[slot] != null) - { - _effectSlotTimers[slot].Stop(); - _activeEffectSlots[slot].Exit(this); - } - _effectSlotTimers[slot].WaitTime = what.Duration; - _effectSlotTimers[slot].Start(); - - what.Enter(this); - _activeEffectSlots[slot] = what; - } - - public void EndEffect(Effect what) - { - what.Exit(this); - _activeEffectSlots[(int)what.Slot] = null; - } - - public void ProcessEffects() - { - for(int i = 0; i < Utility.EffectSlotCount; i++) - _activeEffectSlots[i]?.Process(this); - } - - private void EndEffectAtSlot(int slot) - { - _activeEffectSlots[slot].Exit(this); - _activeEffectSlots[slot] = null; - } - - public void DisableBrain() - { - GetNode("AnimationPlayer").ProcessMode = ProcessModeEnum.Pausable; - ProcessMode = ProcessModeEnum.Disabled; - } - - public void EnableBrain() - { - GetNode("AnimationPlayer").ProcessMode = ProcessModeEnum.Inherit; - ProcessMode = ProcessModeEnum.Inherit; - } - #endregion } diff --git a/scripts/systems/effects/Effect.cs b/scripts/systems/effects/Effect.cs index 43d6e0e..aa80f70 100644 --- a/scripts/systems/effects/Effect.cs +++ b/scripts/systems/effects/Effect.cs @@ -5,7 +5,7 @@ namespace Newlon.Systems.Effects; public abstract partial class Effect : Resource { [Export] public float Duration; - [Export] public Utility.EffectSlots Slot; + [Export] public string Slot; public abstract void Enter(Node target); public abstract void Process(Node target); public abstract void Exit(Node target); diff --git a/scripts/systems/effects/IEffectHandler.cs b/scripts/systems/effects/IEffectHandler.cs deleted file mode 100644 index 6c9b758..0000000 --- a/scripts/systems/effects/IEffectHandler.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Newlon.Systems.Effects; - -public interface IEffectHandler -{ - void GiveEffect(Effect what); - void EndEffect(Effect what); - void ProcessEffects(); -} \ No newline at end of file diff --git a/scripts/systems/effects/IEffectHandler.cs.uid b/scripts/systems/effects/IEffectHandler.cs.uid deleted file mode 100644 index 8c581ef..0000000 --- a/scripts/systems/effects/IEffectHandler.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://eeqk3fvjwg31 diff --git a/scripts/systems/effects/SlownessEffect.cs b/scripts/systems/effects/SlownessEffect.cs index 1491a2c..19d7a4e 100644 --- a/scripts/systems/effects/SlownessEffect.cs +++ b/scripts/systems/effects/SlownessEffect.cs @@ -11,21 +11,20 @@ public partial class SlownessEffect : Effect public override void Enter(Node target) { - if (target is IEffectHandler handler) + if (target is Entity entity) { - if (target is ILocalTimescale timescalable) - timescalable.LocalTimescale *= Multiplier; - if (target is CanvasItem canvasItem) - canvasItem.Modulate = ColorOverride; + entity.LocalTimescale *= Multiplier; + entity.Modulate = ColorOverride; } } public override void Exit(Node target) { - if(target is ILocalTimescale timescalable) - timescalable.LocalTimescale /= Multiplier; - if(target is CanvasItem canvasItem) - canvasItem.Modulate = Colors.White; + if (target is Entity entity) + { + entity.LocalTimescale /= Multiplier; + entity.Modulate = Colors.White; + } } public override void Process(Node target) From c0145c7c7db19d4f0adf33a2785ae547bf257623 Mon Sep 17 00:00:00 2001 From: Rendo Date: Mon, 7 Jul 2025 17:42:55 +0500 Subject: [PATCH 09/14] Effect based audio --- assets/audio/sfx/yuck.mp3.import | 4 ++-- scenes/entities/Zombies/zombie.tscn | 10 +++++++++- scripts/audio/EffectBasedPlayer.cs | 27 ++++++++++++++++++++++++++ scripts/audio/EffectBasedPlayer.cs.uid | 1 + 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 scripts/audio/EffectBasedPlayer.cs create mode 100644 scripts/audio/EffectBasedPlayer.cs.uid diff --git a/assets/audio/sfx/yuck.mp3.import b/assets/audio/sfx/yuck.mp3.import index 65416f2..196eea0 100644 --- a/assets/audio/sfx/yuck.mp3.import +++ b/assets/audio/sfx/yuck.mp3.import @@ -13,7 +13,7 @@ dest_files=["res://.godot/imported/yuck.mp3-300336a3ee536c8e6db69a73706c7ea5.mp3 [params] loop=false -loop_offset=0 -bpm=0 +loop_offset=0.0 +bpm=0.0 beat_count=0 bar_beats=4 diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn index 579b17c..c243a43 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=24 format=3 uid="uid://co11v3w8hbwgf"] +[gd_scene load_steps=27 format=3 uid="uid://co11v3w8hbwgf"] [ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"] [ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="2_4pdxh"] @@ -16,6 +16,9 @@ [ext_resource type="AudioStream" uid="uid://bg76miyscfvhu" path="res://assets/audio/sfx/groan.tres" id="12_ad42i"] [ext_resource type="Script" uid="uid://cnn0ymuhypdff" path="res://scripts/audio/ChannelPlaylist.cs" id="12_he8da"] [ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="12_vjrlo"] +[ext_resource type="Script" uid="uid://b8r6fxsfjdo3a" path="res://scripts/audio/EffectBasedPlayer.cs" id="17_ltj46"] +[ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://resources/effects/GarlicEffect.tres" id="18_2q05d"] +[ext_resource type="Resource" uid="uid://7uj0oe656jfx" path="res://resources/effects/SnowSlow.tres" id="19_ccrjo"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_63ls2"] resource_local_to_scene = true @@ -137,6 +140,11 @@ wait_time = 5.0 one_shot = true autostart = true +[node name="EffectPlayer" type="Node" parent="."] +script = ExtResource("17_ltj46") +effectsToMap = Array[Resource]([ExtResource("18_2q05d"), ExtResource("19_ccrjo")]) +streamsToMapTo = Array[AudioStream]([ExtResource("2_hh4qh"), ExtResource("3_ltj46")]) + [connection signal="OnDamaged" from="." to="HitPlayer" method="Play"] [connection signal="OnHPChanged" from="." to="CanvasGroup" method="DamageFlash"] [connection signal="area_entered" from="Eatbox" to="Eatbox" method="OnAreaEntered"] diff --git a/scripts/audio/EffectBasedPlayer.cs b/scripts/audio/EffectBasedPlayer.cs new file mode 100644 index 0000000..1713e94 --- /dev/null +++ b/scripts/audio/EffectBasedPlayer.cs @@ -0,0 +1,27 @@ +using Godot; +using Godot.Collections; +using System.Collections.Generic; +using Newlon.Components; +using Newlon.Systems.Effects; + +public partial class EffectBasedPlayer : Node +{ + [Export] public Array effectsToMap; + [Export] public Array streamsToMapTo; + private System.Collections.Generic.Dictionary effectToAudioMap = new(); + public override void _Ready() + { + GetParent().EffectStarted += OnEffectStarted; + + for (int i = 0; i < effectsToMap.Count; i++) + { + effectToAudioMap.Add(effectsToMap[i], streamsToMapTo[i]); + } + } + + public void OnEffectStarted(Effect what) + { + if (effectToAudioMap.ContainsKey(what) == false) return; + AudioSequencer.Play(what.Slot, effectToAudioMap[what]); + } +} diff --git a/scripts/audio/EffectBasedPlayer.cs.uid b/scripts/audio/EffectBasedPlayer.cs.uid new file mode 100644 index 0000000..ed55549 --- /dev/null +++ b/scripts/audio/EffectBasedPlayer.cs.uid @@ -0,0 +1 @@ +uid://b8r6fxsfjdo3a From cc03a2a9bddd805ba86cedb754a198c043ce1f0c Mon Sep 17 00:00:00 2001 From: Rendo Date: Mon, 7 Jul 2025 17:51:34 +0500 Subject: [PATCH 10/14] Hobo is now immune to garlic --- scenes/entities/Zombies/hobo.tscn | 8 +++++--- translations/zombies.csv | 4 +++- translations/zombies.en.translation | Bin 1722 -> 1774 bytes translations/zombies.ru.translation | Bin 2561 -> 2661 bytes 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scenes/entities/Zombies/hobo.tscn b/scenes/entities/Zombies/hobo.tscn index 5cb2e5f..29ad27b 100644 --- a/scenes/entities/Zombies/hobo.tscn +++ b/scenes/entities/Zombies/hobo.tscn @@ -1,8 +1,10 @@ -[gd_scene load_steps=44 format=3 uid="uid://bgqmwsb6ynm81"] +[gd_scene load_steps=46 format=3 uid="uid://bgqmwsb6ynm81"] [ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_fnu7s"] [ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_6qr4h"] +[ext_resource type="Script" uid="uid://bcc7skl7ts6sh" path="res://scripts/systems/effects/Effect.cs" id="2_txjqc"] [ext_resource type="Texture2D" uid="uid://cse1504ao4g8e" path="res://assets/sprites/atlases/zombies/hobo.png" id="3_6qr4h"] +[ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://resources/effects/GarlicEffect.tres" id="3_b583s"] [ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/components/particles/FallParticle.cs" id="3_tu6af"] [ext_resource type="AnimationLibrary" uid="uid://cuh2kyb21hmkm" path="res://resources/animations/zombies/basic_zombie.res" id="4_02fim"] [ext_resource type="Script" uid="uid://c5v2og85t7s6j" path="res://scripts/components/zombies/behaviours/HoboBehaviour.cs" id="4_5selg"] @@ -227,8 +229,9 @@ percentage_value = 0.0 mult_value = 1.0 [node name="Hobo" node_paths=PackedStringArray("_armor") instance=ExtResource("1_fnu7s")] -_maxHP = 130 _armor = NodePath("CanArmor") +MaxHP = 130.0 +_effectImmunities = Array[ExtResource("2_txjqc")]([ExtResource("3_b583s")]) [node name="CanvasGroup" parent="." index="0"] material = SubResource("ShaderMaterial_w8pya") @@ -282,7 +285,6 @@ _speed = SubResource("Resource_4248q") [node name="CanArmor" type="Node" parent="." index="7"] script = ExtResource("4_w8pya") -MaxHP = 385 metadata/_custom_type_script = "uid://fd4im1fmwc5n" [node name="Behaviour" type="Node" parent="." index="8" node_paths=PackedStringArray("_eatBox", "_animationTree")] diff --git a/translations/zombies.csv b/translations/zombies.csv index fda31d7..0e3d7eb 100644 --- a/translations/zombies.csv +++ b/translations/zombies.csv @@ -34,13 +34,15 @@ Attack damage: [color=darkred]1 bite[/color]. ","Бронированная ве Скорость атаки: [color=darkred]1 Гц[/color]. Урон от атаки: [color=darkred]1 укус[/color]." hobo,Trash can zombie,Зомби в мусорке -hobo_desc,"Some time in the past he met a great conqueror. Hates to live without his can. Equivalent of ~8 zombies. +hobo_desc,"Some time in the past he met a great conqueror. Hates to live without his can. Equivalent of ~8 zombies. +[color=darkgreen]He is immune to garlic-like effects. [/color] Health points: [color=darkred]13 peas[/color]. Armour points: [color=darkred]39 peas[/color]. Walk speed: [color=darkred]0.2 tiles/second[/color]. Run speed: [color=darkred]0.6 tiles/second[/color]. Attack speed: [color=darkred]1 Hz[/color]. Attack damage: [color=darkred]1 bite[/color]. ","Однажды повстречал великого полководца. Ненавидит жить без своего ведра. Равен примерно 8 зомби. +[color=darkgreen]Имеет иммунитет к эффектам как у чеснока. [/color] Очки здоровья: [color=darkred]13 горошин[/color]. Armour points: [color=darkred]39 горошин[/color]. Скорость ходьбы: [color=darkred]0.2 клеток/сек[/color]. diff --git a/translations/zombies.en.translation b/translations/zombies.en.translation index 45f31c8b9c164bef0767fd7c02322eda65369dc5..184a456f6e977008ec1eb78bc7d4b4acbb2cb5de 100644 GIT binary patch delta 99 zcmdnR`;K>m5EE+yBLl;^$>L1LjFUEdGX*gl=NbNsE)~=IXDi|VFWXwt_&;N;2Y1OM z-3N0Lto^6UoSFVFo0~~T=Q=Z2<-h2oAeFI`3s__(?_&MJ$H2hOz`y`Bks&BJ$Qb~y ChalYm delta 45 zcmaFIyNh>&5EH8(BLl;P$>L1Lj0u~)nSz)n7c$9Ce#82Ohn<0e0Vu~16ddFX029Uv A=>Px# diff --git a/translations/zombies.ru.translation b/translations/zombies.ru.translation index aa9df639bcc3dee14a60ecd5703c6ea7273414f2..61893824cd4210f18a32ee78f92dc5b479c5af91 100644 GIT binary patch delta 144 zcmZn^c`C9&k%@I369dD#$!bi-jDI#qF)^{FMknXzu?47P7f@`&g*^%vb^$4%c(cOAcA%n0 hpz?hnF+GK7eX!}Vo1-~qF!Hc7FfcFzaZqrOGXM+ Date: Mon, 7 Jul 2025 23:14:32 +0500 Subject: [PATCH 11/14] Plants animation now supports timescale --- resources/animations/plants/sunflower.res | Bin 821 -> 790 bytes scenes/entities/plants/aloe.tscn | 22 +++++++++++++----- scenes/entities/plants/garlic.tscn | 18 ++++++++++---- scenes/entities/plants/peashooter.tscn | 17 +++++++++++--- scenes/entities/plants/potato_mine.tscn | 22 +++++++++++++----- scenes/entities/plants/snowpea.tscn | 14 +++++++++-- scenes/entities/plants/spikeweed.tscn | 18 ++++++++++---- scenes/entities/plants/sunflower.tscn | 21 ++++++++++++----- scenes/entities/plants/threepeater.tscn | 14 +++++++++-- scenes/entities/plants/wallnut.tscn | 19 +++++++++++---- scenes/templates/plant_template.tscn | 1 - scripts/components/Entity.cs | 4 +++- .../plants/behaviours/AloeBehaviour.cs | 4 ++-- .../plants/behaviours/HpBasedBehaviour.cs | 2 +- .../plants/behaviours/PeashooterBehaviour.cs | 2 +- .../plants/behaviours/PotatomineBehaviour.cs | 4 ++-- .../plants/behaviours/SpikeweedBehaviour.cs | 8 +++---- .../plants/behaviours/SunflowerBehaviour.cs | 11 ++------- 18 files changed, 141 insertions(+), 60 deletions(-) diff --git a/resources/animations/plants/sunflower.res b/resources/animations/plants/sunflower.res index 1f15a380fd39ade72d35cb6bda4043b479ec4c7e..107ee2934a324a3ad1ec3ff02fe7422c6bf8686c 100644 GIT binary patch literal 790 zcmV+x1L^!yQ$s@n000005C8zO2mk>70ssIgwJ-f(vInIX07hM8K`@Pz4iyI&3~?}I zL!}q+9WEk~+Qeil+2!1OlLlM# z!#7M2Mxf;!$<}?=G)>bqO_C%@k|fm$`=WHjp}8$8@EH|MJ|>)y2Ag9*7%ccukN`nS zZwQ6Oa`8C8>EPJ-lc36(flUU6M!-cTlj&?L)JEkQQLW0K;aIrtn;Pa~xqO^jP%1QT zYpAO7P@N3~^}l4>R!TaX2#{0GVD&gP-EAXdfKA&a$3(13qfzrgAwKWiWDS z60=u@@6i2`VaR}IP5v{-7+Tz3a2H=+(fZeSt3{xprgTs9!psNB#ixMu_^Q z<{c0{{RhwJ-f(BM6-s0EQlELm-Vd9SBk(AOL_^ z1W6*H%=OzW z->qxt|K&e}Z#e&6ixMb;Z+T1d3@7AbQzV<)GS<)`6lww?TQ6_W$EhbOa zY({U!MU8S9YwgkhHJNk#7w~_|ID1^o5aIh)CN2yc!O0EtpTjM8gJu%tPNrv}tN9R=pjK>ATz@KF(WTS1iY{C^uj5(CJImN}x0r zJ7^$kj)EgO8%Et9?}=k=%1lbPpomGSZY2Jw<13U~%7!u4jLQD0*_2;!1=>qzMZYZT zyIbO^o4}NgbeLQMyscM$?Jo3IZi!S7HthkTkr8rA~XR7%SYrx9s#cjs8~KKUgHFU{g%4nfn%q#d;L1g zLKq5g=n`BE5WZSI*i*eQO6|!Z`c|ORtw@DL*Zl|oU%Md%e2Ry^xp5f-Qd2`i)kc2A diff --git a/scenes/entities/plants/aloe.tscn b/scenes/entities/plants/aloe.tscn index 00dfc9e..9047d01 100644 --- a/scenes/entities/plants/aloe.tscn +++ b/scenes/entities/plants/aloe.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=3 uid="uid://bw1w8jp0yeypy"] +[gd_scene load_steps=20 format=3 uid="uid://bw1w8jp0yeypy"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_n25yi"] [ext_resource type="Texture2D" uid="uid://b6tyoa5htapir" path="res://assets/sprites/atlases/plants/aloe.png" id="2_iup5p"] @@ -22,7 +22,7 @@ tracks/0/keys = { tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true -tracks/1/path = NodePath("AnimationTree:parameters/conditions/heal") +tracks/1/path = NodePath("AnimationTree:parameters/Tree/conditions/heal") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { @@ -37,6 +37,8 @@ _data = { &"RESET": SubResource("Animation_vknky") } +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_qtb3p"] + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_c25ew"] animation = &"aloe/heal" @@ -80,12 +82,19 @@ states/aloe_recharge/position = Vector2(530, 171) transitions = ["Start", "aloe_idle", SubResource("AnimationNodeStateMachineTransition_gi6e0"), "aloe_heal", "aloe_idle_used", SubResource("AnimationNodeStateMachineTransition_l1t7h"), "aloe_recharge", "aloe_idle", SubResource("AnimationNodeStateMachineTransition_cut4s"), "aloe_idle", "aloe_heal", SubResource("AnimationNodeStateMachineTransition_um4ov"), "aloe_idle_used", "aloe_recharge", SubResource("AnimationNodeStateMachineTransition_4kdc0")] graph_offset = Vector2(-78.082, -71.7578) +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_gfy6j"] +graph_offset = Vector2(-383, 84) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_qtb3p") +nodes/TimeScale/position = Vector2(120, 120) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_bldox") +nodes/Tree/position = Vector2(-140, 160) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="RectangleShape2D" id="RectangleShape2D_oe0dc"] size = Vector2(22, 32) [node name="Aloe" instance=ExtResource("1_n25yi")] MaxHP = 30.0 -_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] position = Vector2(9, -14) @@ -100,9 +109,10 @@ libraries = { } [node name="AnimationTree" parent="." index="2"] -tree_root = SubResource("AnimationNodeStateMachine_bldox") -parameters/conditions/charged = false -parameters/conditions/heal = false +tree_root = SubResource("AnimationNodeBlendTree_gfy6j") +parameters/TimeScale/scale = 1.0 +parameters/Tree/conditions/charged = false +parameters/Tree/conditions/heal = false [node name="Behaviour" type="Node" parent="." index="3"] script = ExtResource("4_55asm") diff --git a/scenes/entities/plants/garlic.tscn b/scenes/entities/plants/garlic.tscn index bd855b0..46bea8a 100644 --- a/scenes/entities/plants/garlic.tscn +++ b/scenes/entities/plants/garlic.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=14 format=3 uid="uid://qq0cw8xtcoj3"] +[gd_scene load_steps=16 format=3 uid="uid://qq0cw8xtcoj3"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_5i0e6"] [ext_resource type="Texture2D" uid="uid://dff73m8ahamaa" path="res://assets/sprites/atlases/plants/garlic.png" id="2_w2jbi"] @@ -27,6 +27,8 @@ _data = { &"RESET": SubResource("Animation_k0cex") } +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2d3xk"] + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_mdv0r"] animation = &"garlic/full_hp" @@ -46,12 +48,19 @@ blend_point_2/pos = 0.3 min_space = 0.0 blend_mode = 1 +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_2o7sr"] +graph_offset = Vector2(-397, 76) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_2d3xk") +nodes/TimeScale/position = Vector2(100, 160) +nodes/Tree/node = SubResource("AnimationNodeBlendSpace1D_8mvpm") +nodes/Tree/position = Vector2(-160, 200) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="RectangleShape2D" id="RectangleShape2D_thlvs"] size = Vector2(32, 29) [node name="Garlic" instance=ExtResource("1_5i0e6")] MaxHP = 200.0 -_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_w2jbi") @@ -65,8 +74,9 @@ libraries = { } [node name="AnimationTree" parent="." index="2"] -tree_root = SubResource("AnimationNodeBlendSpace1D_8mvpm") -parameters/blend_position = 1.0 +tree_root = SubResource("AnimationNodeBlendTree_2o7sr") +parameters/TimeScale/scale = 1.0 +parameters/Tree/blend_position = 1.0 [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] position = Vector2(1, 11.5) diff --git a/scenes/entities/plants/peashooter.tscn b/scenes/entities/plants/peashooter.tscn index d9661db..aee5b0e 100644 --- a/scenes/entities/plants/peashooter.tscn +++ b/scenes/entities/plants/peashooter.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=21 format=3 uid="uid://dy41q1kxray5t"] +[gd_scene load_steps=23 format=3 uid="uid://dy41q1kxray5t"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_pyk3o"] [ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="2_14qlx"] @@ -31,6 +31,8 @@ _data = { &"RESET": SubResource("Animation_a2y0j") } +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_mbbd7"] + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_34v85"] animation = &"peashooter/idle" @@ -55,6 +57,14 @@ states/peashooter_shoot/node = SubResource("AnimationNodeAnimation_u4o2k") states/peashooter_shoot/position = Vector2(674, 82) transitions = ["Start", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_70n3m"), "peashooter_idle", "peashooter_shoot", SubResource("AnimationNodeStateMachineTransition_2lwpg"), "peashooter_shoot", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_k61yr")] +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_q58jr"] +graph_offset = Vector2(-518.8, 27.8) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_mbbd7") +nodes/TimeScale/position = Vector2(0, 120) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_13o7y") +nodes/Tree/position = Vector2(-300, 120) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="SegmentShape2D" id="SegmentShape2D_8iovl"] resource_local_to_scene = true @@ -77,8 +87,9 @@ libraries = { autoplay = "peashooter/idle" [node name="AnimationTree" parent="." index="2"] -tree_root = SubResource("AnimationNodeStateMachine_13o7y") -parameters/conditions/ready = false +tree_root = SubResource("AnimationNodeBlendTree_q58jr") +parameters/TimeScale/scale = 1.0 +parameters/Tree/conditions/ready = false [node name="Shooter" type="Marker2D" parent="." index="3" node_paths=PackedStringArray("_timer")] position = Vector2(12, -4) diff --git a/scenes/entities/plants/potato_mine.tscn b/scenes/entities/plants/potato_mine.tscn index c53e617..4a12b17 100644 --- a/scenes/entities/plants/potato_mine.tscn +++ b/scenes/entities/plants/potato_mine.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=24 format=3 uid="uid://b5x35v3w2u8dx"] +[gd_scene load_steps=26 format=3 uid="uid://b5x35v3w2u8dx"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_dj7ul"] [ext_resource type="Texture2D" uid="uid://c77o6ba0mw7a3" path="res://assets/sprites/atlases/plants/potato_mine.png" id="2_sneas"] @@ -10,6 +10,8 @@ [ext_resource type="AudioStream" uid="uid://dltjtpyfr1so0" path="res://assets/audio/sfx/potato_mine.mp3" id="8_3vqdc"] [ext_resource type="AudioStream" uid="uid://b27om1bw1x04e" path="res://assets/audio/sfx/dirt_rise.mp3" id="9_3vqdc"] +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_3vqdc"] + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6uutc"] animation = &"potato_mine/explode" @@ -55,6 +57,14 @@ states/potato_mine_prime/position = Vector2(490.656, 75.168) transitions = ["Start", "potato_mine_idle_unprimed", SubResource("AnimationNodeStateMachineTransition_ttnxb"), "potato_mine_idle_unprimed", "potato_mine_prime", SubResource("AnimationNodeStateMachineTransition_8nvnf"), "potato_mine_explode", "End", SubResource("AnimationNodeStateMachineTransition_q0arb"), "potato_mine_prime", "potato_mine_idle_primed", SubResource("AnimationNodeStateMachineTransition_dikhn"), "potato_mine_idle_primed", "potato_mine_explode", SubResource("AnimationNodeStateMachineTransition_lqd1d")] graph_offset = Vector2(-16.3438, -67.832) +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_824aq"] +graph_offset = Vector2(-427, 79) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_3vqdc") +nodes/TimeScale/position = Vector2(100, 120) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_nfn7b") +nodes/Tree/position = Vector2(-260, 140) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="CircleShape2D" id="CircleShape2D_v0g5b"] radius = 19.0263 @@ -69,13 +79,12 @@ size = Vector2(34, 19) [node name="Potato mine" instance=ExtResource("1_dj7ul")] MaxHP = 20.0 -_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_sneas") hframes = 7 vframes = 4 -frame = 7 +frame = 14 [node name="AnimationPlayer" parent="." index="1"] libraries = { @@ -84,9 +93,10 @@ libraries = { autoplay = "idle_unprimed" [node name="AnimationTree" parent="." index="2"] -tree_root = SubResource("AnimationNodeStateMachine_nfn7b") -parameters/conditions/explode = false -parameters/conditions/primed = false +tree_root = SubResource("AnimationNodeBlendTree_824aq") +parameters/TimeScale/scale = 1.0 +parameters/Tree/conditions/explode = false +parameters/Tree/conditions/primed = false [node name="Detectionbox" type="Area2D" parent="." index="3"] collision_layer = 0 diff --git a/scenes/entities/plants/snowpea.tscn b/scenes/entities/plants/snowpea.tscn index eb784f2..97fd65c 100644 --- a/scenes/entities/plants/snowpea.tscn +++ b/scenes/entities/plants/snowpea.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=14 format=3 uid="uid://b7innrovtmf5u"] +[gd_scene load_steps=16 format=3 uid="uid://b7innrovtmf5u"] [ext_resource type="PackedScene" uid="uid://dy41q1kxray5t" path="res://scenes/entities/plants/peashooter.tscn" id="1_lp85e"] [ext_resource type="Texture2D" uid="uid://cu0651pvvkmvm" path="res://assets/sprites/atlases/plants/snow_pea.png" id="2_ytrm0"] @@ -25,6 +25,8 @@ _data = { &"RESET": SubResource("Animation_pephc") } +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_mbbd7"] + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_dv2ad"] animation = &"snowpea/idle" @@ -49,6 +51,14 @@ states/snowpea_shoot/node = SubResource("AnimationNodeAnimation_ptach") states/snowpea_shoot/position = Vector2(682, 100) transitions = ["snowpea_shoot", "snowpea_idle", SubResource("AnimationNodeStateMachineTransition_8spty"), "Start", "snowpea_idle", SubResource("AnimationNodeStateMachineTransition_lshcr"), "snowpea_idle", "snowpea_shoot", SubResource("AnimationNodeStateMachineTransition_ihul0")] +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_3oyhk"] +graph_offset = Vector2(-518.8, 27.8) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_mbbd7") +nodes/TimeScale/position = Vector2(0, 120) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_qdmro") +nodes/Tree/position = Vector2(-320, 100) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="SegmentShape2D" id="SegmentShape2D_3oyhk"] resource_local_to_scene = true @@ -65,7 +75,7 @@ libraries = { autoplay = "snowpea/idle" [node name="AnimationTree" parent="." index="2"] -tree_root = SubResource("AnimationNodeStateMachine_qdmro") +tree_root = SubResource("AnimationNodeBlendTree_3oyhk") [node name="Shooter" parent="." index="3"] _projectile = ExtResource("5_bv86m") diff --git a/scenes/entities/plants/spikeweed.tscn b/scenes/entities/plants/spikeweed.tscn index d44984d..6c669a8 100644 --- a/scenes/entities/plants/spikeweed.tscn +++ b/scenes/entities/plants/spikeweed.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=3 uid="uid://bdhod5c6o53ha"] +[gd_scene load_steps=12 format=3 uid="uid://bdhod5c6o53ha"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_vmbvr"] [ext_resource type="Texture2D" uid="uid://coafh3mjharxo" path="res://assets/sprites/atlases/plants/spikeweed.png" id="2_ffrjr"] @@ -6,6 +6,8 @@ [ext_resource type="AnimationLibrary" uid="uid://cen6ku4y01dyg" path="res://resources/animations/plants/spikeweed.res" id="3_nwshn"] [ext_resource type="Script" uid="uid://dqquodxaijmem" path="res://scripts/components/plants/behaviours/SpikeweedBehaviour.cs" id="3_uhpn7"] +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_jleqa"] + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_lmfqg"] animation = &"spikeweed/idle" @@ -22,12 +24,19 @@ snap = 1.0 value_label = "attack" blend_mode = 1 +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_63okc"] +graph_offset = Vector2(-318, 108) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_jleqa") +nodes/TimeScale/position = Vector2(140, 140) +nodes/Tree/node = SubResource("AnimationNodeBlendSpace1D_1y7y3") +nodes/Tree/position = Vector2(-120, 180) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="RectangleShape2D" id="RectangleShape2D_1di76"] size = Vector2(49, 38) [node name="Spikeweed" instance=ExtResource("1_vmbvr")] MaxHP = 30.0 -_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_ffrjr") @@ -41,8 +50,9 @@ libraries = { } [node name="AnimationTree" parent="." index="2"] -tree_root = SubResource("AnimationNodeBlendSpace1D_1y7y3") -parameters/blend_position = 0.0 +tree_root = SubResource("AnimationNodeBlendTree_63okc") +parameters/TimeScale/scale = 1.0 +parameters/Tree/blend_position = 0 [node name="Behaviour" type="Node" parent="." index="3" node_paths=PackedStringArray("_tree")] script = ExtResource("3_uhpn7") diff --git a/scenes/entities/plants/sunflower.tscn b/scenes/entities/plants/sunflower.tscn index 045bc2f..cb0c035 100644 --- a/scenes/entities/plants/sunflower.tscn +++ b/scenes/entities/plants/sunflower.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=3 uid="uid://bg7lomiorxo2c"] +[gd_scene load_steps=18 format=3 uid="uid://bg7lomiorxo2c"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_bikjn"] [ext_resource type="Texture2D" uid="uid://b3tuidu8dag8u" path="res://assets/sprites/atlases/plants/sunflower.png" id="2_fwcda"] @@ -12,7 +12,7 @@ length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("AnimationTree:parameters/conditions/produce") +tracks/0/path = NodePath("AnimationTree:parameters/Tree/conditions/produce") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -27,6 +27,8 @@ _data = { &"RESET": SubResource("Animation_bfx6v") } +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_811ah"] + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_lkpmx"] animation = &"sunflower/idle" @@ -51,18 +53,24 @@ states/sunflower_produce/node = SubResource("AnimationNodeAnimation_hc6hn") states/sunflower_produce/position = Vector2(624, 99) transitions = ["Start", "sunflower_idle", SubResource("AnimationNodeStateMachineTransition_26fia"), "sunflower_idle", "sunflower_produce", SubResource("AnimationNodeStateMachineTransition_d2akw"), "sunflower_produce", "sunflower_idle", SubResource("AnimationNodeStateMachineTransition_sww40")] +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_rlkb7"] +graph_offset = Vector2(-437, 84) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_811ah") +nodes/TimeScale/position = Vector2(100, 140) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_enpal") +nodes/Tree/position = Vector2(-160, 180) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="RectangleShape2D" id="RectangleShape2D_4xs4g"] size = Vector2(26, 48) [node name="Sunflower" instance=ExtResource("1_bikjn")] MaxHP = 30.0 -_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_fwcda") hframes = 9 vframes = 2 -frame = 4 [node name="AnimationPlayer" parent="." index="1"] libraries = { @@ -71,8 +79,9 @@ libraries = { } [node name="AnimationTree" parent="." index="2"] -tree_root = SubResource("AnimationNodeStateMachine_enpal") -parameters/conditions/produce = false +tree_root = SubResource("AnimationNodeBlendTree_rlkb7") +parameters/TimeScale/scale = 1.0 +parameters/Tree/conditions/produce = false [node name="PlantSunSpawner" type="Node2D" parent="." index="3"] position = Vector2(-2, 0) diff --git a/scenes/entities/plants/threepeater.tscn b/scenes/entities/plants/threepeater.tscn index f9fedb5..bae2cac 100644 --- a/scenes/entities/plants/threepeater.tscn +++ b/scenes/entities/plants/threepeater.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=3 uid="uid://eegv1qihfv2q"] +[gd_scene load_steps=20 format=3 uid="uid://eegv1qihfv2q"] [ext_resource type="PackedScene" uid="uid://dy41q1kxray5t" path="res://scenes/entities/plants/peashooter.tscn" id="1_muntu"] [ext_resource type="Script" uid="uid://djpc0kvagpadv" path="res://scripts/components/plants/ThreepeaterShooter.cs" id="2_ieami"] @@ -94,6 +94,8 @@ _data = { &"shoot": SubResource("Animation_7kfrv") } +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_mbbd7"] + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_j7h7q"] animation = &"threepeater/idle" @@ -118,6 +120,14 @@ states/threepeater_shoot/node = SubResource("AnimationNodeAnimation_pqbws") states/threepeater_shoot/position = Vector2(633, 91) transitions = ["Start", "threepeater_idle", SubResource("AnimationNodeStateMachineTransition_7kfrv"), "threepeater_idle", "threepeater_shoot", SubResource("AnimationNodeStateMachineTransition_o2obw"), "threepeater_shoot", "threepeater_idle", SubResource("AnimationNodeStateMachineTransition_wiys2")] +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_j7h7q"] +graph_offset = Vector2(-518.8, 27.8) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_mbbd7") +nodes/TimeScale/position = Vector2(0, 120) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_wiys2") +nodes/Tree/position = Vector2(-320, 100) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="SegmentShape2D" id="SegmentShape2D_j7h7q"] resource_local_to_scene = true @@ -138,7 +148,7 @@ libraries = { } [node name="AnimationTree" parent="." index="2"] -tree_root = SubResource("AnimationNodeStateMachine_wiys2") +tree_root = SubResource("AnimationNodeBlendTree_j7h7q") [node name="Shooter" parent="." index="3"] position = Vector2(20, -9) diff --git a/scenes/entities/plants/wallnut.tscn b/scenes/entities/plants/wallnut.tscn index dc796e0..76e6f40 100644 --- a/scenes/entities/plants/wallnut.tscn +++ b/scenes/entities/plants/wallnut.tscn @@ -1,10 +1,12 @@ -[gd_scene load_steps=10 format=3 uid="uid://bq7imkpr2yqyr"] +[gd_scene load_steps=12 format=3 uid="uid://bq7imkpr2yqyr"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_fluxn"] [ext_resource type="Texture2D" uid="uid://dstqh1wc5dvmo" path="res://assets/sprites/atlases/plants/wallnut.png" id="2_o5tda"] [ext_resource type="AnimationLibrary" uid="uid://0bdesb8j2mbo" path="res://resources/animations/plants/wallnut.res" id="3_xl65q"] [ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/components/plants/behaviours/HpBasedBehaviour.cs" id="4_cjtyy"] +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_y3tlf"] + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ds5ry"] animation = &"wallnut/idle_full" @@ -24,18 +26,24 @@ blend_point_2/pos = 0.3 min_space = 0.0 blend_mode = 1 +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_bi7an"] +graph_offset = Vector2(-498, 95) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_y3tlf") +nodes/TimeScale/position = Vector2(60, 140) +nodes/Tree/node = SubResource("AnimationNodeBlendSpace1D_nij8v") +nodes/Tree/position = Vector2(-180, 180) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="RectangleShape2D" id="RectangleShape2D_khltr"] size = Vector2(33, 46) [node name="Wallnut" instance=ExtResource("1_fluxn")] MaxHP = 600.0 -_effectImmunities = Array[Resource]([]) [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_o5tda") hframes = 12 vframes = 3 -frame = 3 [node name="AnimationPlayer" parent="." index="1"] libraries = { @@ -43,8 +51,9 @@ libraries = { } [node name="AnimationTree" parent="." index="2"] -tree_root = SubResource("AnimationNodeBlendSpace1D_nij8v") -parameters/blend_position = 1.0 +tree_root = SubResource("AnimationNodeBlendTree_bi7an") +parameters/TimeScale/scale = 1.0 +parameters/Tree/blend_position = 1.0 [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] position = Vector2(3.5, 5) diff --git a/scenes/templates/plant_template.tscn b/scenes/templates/plant_template.tscn index 2266c6a..685838b 100644 --- a/scenes/templates/plant_template.tscn +++ b/scenes/templates/plant_template.tscn @@ -4,7 +4,6 @@ [node name="PlantTemplate" type="Node2D"] script = ExtResource("1_324sd") -_maxHP = 30 [node name="Sprite2D" type="Sprite2D" parent="."] use_parent_material = true diff --git a/scripts/components/Entity.cs b/scripts/components/Entity.cs index f4d181a..5d09167 100644 --- a/scripts/components/Entity.cs +++ b/scripts/components/Entity.cs @@ -44,13 +44,15 @@ public partial class Entity : Node2D #region Brain public virtual void DisableBrain() { - GetNode("AnimationPlayer").ProcessMode = ProcessModeEnum.Pausable; + GetNode("AnimationPlayer").ProcessMode = ProcessModeEnum.Always; + GetNode("AnimationTree").ProcessMode = ProcessModeEnum.Always; ProcessMode = ProcessModeEnum.Disabled; } public virtual void EnableBrain() { GetNode("AnimationPlayer").ProcessMode = ProcessModeEnum.Inherit; + GetNode("AnimationTree").ProcessMode = ProcessModeEnum.Inherit; ProcessMode = ProcessModeEnum.Inherit; } #endregion diff --git a/scripts/components/plants/behaviours/AloeBehaviour.cs b/scripts/components/plants/behaviours/AloeBehaviour.cs index f9dde56..3186709 100644 --- a/scripts/components/plants/behaviours/AloeBehaviour.cs +++ b/scripts/components/plants/behaviours/AloeBehaviour.cs @@ -17,7 +17,7 @@ public partial class AloeBehaviour : BaseBehaviour public override void _Process(double delta) { - _tree.Set("parameters/conditions/charged",_charge); + _tree.Set("parameters/Tree/conditions/charged",_charge); var checkPos = GetParent().GlobalPosition + Vector2.Right * Utility.TileWidth; if(_charge && PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData)) @@ -25,7 +25,7 @@ public partial class AloeBehaviour : BaseBehaviour if((float)plantData.HP / (float)plantData.MaxHP < _hpTreshold) { _charge = false; - _tree.Set("parameters/conditions/heal",true); + _tree.Set("parameters/Tree/conditions/heal",true); _timer.Start(); } } diff --git a/scripts/components/plants/behaviours/HpBasedBehaviour.cs b/scripts/components/plants/behaviours/HpBasedBehaviour.cs index a234287..4c7fe1e 100644 --- a/scripts/components/plants/behaviours/HpBasedBehaviour.cs +++ b/scripts/components/plants/behaviours/HpBasedBehaviour.cs @@ -13,6 +13,6 @@ public partial class HpBasedBehaviour : BaseBehaviour public void OnHPChanged(int amount,Node origin) { - _tree.Set("parameters/blend_position",(float)_data.HP/_data.MaxHP); + _tree.Set("parameters/Tree/blend_position",(float)_data.HP/_data.MaxHP); } } diff --git a/scripts/components/plants/behaviours/PeashooterBehaviour.cs b/scripts/components/plants/behaviours/PeashooterBehaviour.cs index be36c8e..71d0568 100644 --- a/scripts/components/plants/behaviours/PeashooterBehaviour.cs +++ b/scripts/components/plants/behaviours/PeashooterBehaviour.cs @@ -11,6 +11,6 @@ public partial class PeashooterBehaviour : BaseBehaviour { bool readyToShoot = _sight.EnemyDetected && _shootTimer.TimeLeft <= 0; - _tree.Set("parameters/conditions/ready",readyToShoot); + _tree.Set("parameters/Tree/conditions/ready",readyToShoot); } } diff --git a/scripts/components/plants/behaviours/PotatomineBehaviour.cs b/scripts/components/plants/behaviours/PotatomineBehaviour.cs index 75c38c3..8f16553 100644 --- a/scripts/components/plants/behaviours/PotatomineBehaviour.cs +++ b/scripts/components/plants/behaviours/PotatomineBehaviour.cs @@ -10,7 +10,7 @@ public partial class PotatomineBehaviour : BaseBehaviour private bool _primed = false; public void Prime() { - _tree.Set("parameters/conditions/primed",true); + _tree.Set("parameters/Tree/conditions/primed",true); _hitbox.Monitorable = false; @@ -22,7 +22,7 @@ public partial class PotatomineBehaviour : BaseBehaviour public void OnAreaEntered(Area2D area) { if (_primed == false) return; - _tree.Set("parameters/conditions/explode",true); + _tree.Set("parameters/Tree/conditions/explode",true); _primed = false; } } diff --git a/scripts/components/plants/behaviours/SpikeweedBehaviour.cs b/scripts/components/plants/behaviours/SpikeweedBehaviour.cs index 7e4d3e6..2569966 100644 --- a/scripts/components/plants/behaviours/SpikeweedBehaviour.cs +++ b/scripts/components/plants/behaviours/SpikeweedBehaviour.cs @@ -2,20 +2,18 @@ using Godot; namespace Newlon.Components.Plants.Behaviours; -public partial class SpikeweedBehaviour : Node +public partial class SpikeweedBehaviour : BaseBehaviour { - [Export] private AnimationTree _tree; - private int _inCount = 0; public void OnHitboxEntered(Area2D _area) { if (_inCount++ == 0) - _tree.Set("parameters/blend_position",1); + _tree.Set("parameters/Tree/blend_position",1); } public void OnHitboxExited(Area2D _area) { if (--_inCount == 0) - _tree.Set("parameters/blend_position",0); + _tree.Set("parameters/Tree/blend_position",0); } } diff --git a/scripts/components/plants/behaviours/SunflowerBehaviour.cs b/scripts/components/plants/behaviours/SunflowerBehaviour.cs index 8672ac9..b01d703 100644 --- a/scripts/components/plants/behaviours/SunflowerBehaviour.cs +++ b/scripts/components/plants/behaviours/SunflowerBehaviour.cs @@ -2,18 +2,11 @@ using Godot; namespace Newlon.Components.Plants.Behaviours; -public partial class SunflowerBehaviour : Node +public partial class SunflowerBehaviour : BaseBehaviour { - private AnimationTree _tree; - - public override void _Ready() - { - _tree = GetNode("../AnimationTree"); - } - public void Timeout() { - _tree.Set("parameters/conditions/produce", true); + _tree.Set("parameters/Tree/conditions/produce", true); } } From df940e2ba6ae2f65d1e8254d85fe6150784ecceb Mon Sep 17 00:00:00 2001 From: Rendo Date: Mon, 7 Jul 2025 23:27:36 +0500 Subject: [PATCH 12/14] Zombie animation now supports timescale --- scenes/entities/Zombies/hobo.tscn | 17 ++++++++++++++--- scenes/entities/Zombies/zombie.tscn | 15 +++++++++++++-- .../zombies/behaviours/HoboBehaviour.cs | 3 +-- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/scenes/entities/Zombies/hobo.tscn b/scenes/entities/Zombies/hobo.tscn index 29ad27b..8751989 100644 --- a/scenes/entities/Zombies/hobo.tscn +++ b/scenes/entities/Zombies/hobo.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=46 format=3 uid="uid://bgqmwsb6ynm81"] +[gd_scene load_steps=48 format=3 uid="uid://bgqmwsb6ynm81"] [ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_fnu7s"] [ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_6qr4h"] @@ -152,6 +152,8 @@ _data = { &"run": SubResource("Animation_5selg") } +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"] + [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_h0rfo"] animation = &"basic_zombie/eat" @@ -219,7 +221,15 @@ states/hobo_zombie_can_destroy/position = Vector2(368, 206) states/hobo_zombie_run/node = SubResource("AnimationNodeAnimation_c1y3b") states/hobo_zombie_run/position = Vector2(866, 89) transitions = ["Start", "basic_zombie_idle", SubResource("AnimationNodeStateMachineTransition_vxhht"), "basic_zombie_idle", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_y2ivb"), "basic_zombie_walk", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_7d3k4"), "basic_zombie_idle", "basic_zombie_walk", SubResource("AnimationNodeStateMachineTransition_qg8rq"), "basic_zombie_idle", "hobo_zombie_run", SubResource("AnimationNodeStateMachineTransition_4248q"), "hobo_zombie_run", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_tu6af"), "basic_zombie_eat", "hobo_zombie_run", SubResource("AnimationNodeStateMachineTransition_yalvk"), "hobo_zombie_can_destroy", "basic_zombie_idle", SubResource("AnimationNodeStateMachineTransition_7jlle"), "basic_zombie_eat", "basic_zombie_walk", SubResource("AnimationNodeStateMachineTransition_w1b1s"), "basic_zombie_walk", "hobo_zombie_run", SubResource("AnimationNodeStateMachineTransition_02fim")] -graph_offset = Vector2(55, -28) +graph_offset = Vector2(210, 91) + +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_txjqc"] +graph_offset = Vector2(-447, 53) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_2q05d") +nodes/TimeScale/position = Vector2(60, 120) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_xg3p6") +nodes/Tree/position = Vector2(-220, 120) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] [sub_resource type="Resource" id="Resource_4248q"] resource_local_to_scene = true @@ -277,7 +287,7 @@ autoplay = "baisc_zombie/walk" speed_scale = 3.0 [node name="AnimationTree" parent="." index="4"] -tree_root = SubResource("AnimationNodeStateMachine_xg3p6") +tree_root = SubResource("AnimationNodeBlendTree_txjqc") advance_expression_base_node = NodePath("../Behaviour") [node name="Mover" parent="." index="5"] @@ -285,6 +295,7 @@ _speed = SubResource("Resource_4248q") [node name="CanArmor" type="Node" parent="." index="7"] script = ExtResource("4_w8pya") +MaxHP = 385.0 metadata/_custom_type_script = "uid://fd4im1fmwc5n" [node name="Behaviour" type="Node" parent="." index="8" node_paths=PackedStringArray("_eatBox", "_animationTree")] diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn index c243a43..a4db44c 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=27 format=3 uid="uid://co11v3w8hbwgf"] +[gd_scene load_steps=29 format=3 uid="uid://co11v3w8hbwgf"] [ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"] [ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="2_4pdxh"] @@ -59,6 +59,16 @@ _data = { &"RESET": SubResource("Animation_qv5y7") } +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"] + +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_ccrjo"] +graph_offset = Vector2(-447, 53) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_2q05d") +nodes/TimeScale/position = Vector2(60, 120) +nodes/Tree/node = ExtResource("8_ckb7n") +nodes/Tree/position = Vector2(-240, 120) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + [sub_resource type="Resource" id="Resource_ckb7n"] resource_local_to_scene = true script = ExtResource("7_b3p4o") @@ -106,9 +116,10 @@ libraries = { } [node name="AnimationTree" type="AnimationTree" parent="."] -tree_root = ExtResource("8_ckb7n") +tree_root = SubResource("AnimationNodeBlendTree_ccrjo") advance_expression_base_node = NodePath("../Eatbox") anim_player = NodePath("../AnimationPlayer") +parameters/TimeScale/scale = 1.0 [node name="Mover" type="Node" parent="."] script = ExtResource("4_u5syx") diff --git a/scripts/components/zombies/behaviours/HoboBehaviour.cs b/scripts/components/zombies/behaviours/HoboBehaviour.cs index 86cc9a6..dd0dd8d 100644 --- a/scripts/components/zombies/behaviours/HoboBehaviour.cs +++ b/scripts/components/zombies/behaviours/HoboBehaviour.cs @@ -11,8 +11,7 @@ public partial class HoboBehaviour : Node public void Trashed() { canDestroyed = true; - ((AnimationNodeStateMachinePlayback)_animationTree.Get("parameters/playback")).Travel("hobo_zombie_can_destroy"); - _animationTree.Set("parameters/eat_Tree/blend/blend_amount", 1.0); + ((AnimationNodeStateMachinePlayback)_animationTree.Get("parameters/Tree/playback")).Travel("hobo_zombie_can_destroy"); _eatBox._damage.SetMult(3.0f); } } From e527d1da4427aeddef69c5f609da06233abfd930 Mon Sep 17 00:00:00 2001 From: Rendo Date: Tue, 8 Jul 2025 00:05:23 +0500 Subject: [PATCH 13/14] Timescalable components --- scenes/entities/Zombies/zombie.tscn | 8 ++++--- scenes/entities/plants/aloe.tscn | 7 +++++-- scenes/entities/plants/peashooter.tscn | 7 +++++-- scenes/entities/plants/potato_mine.tscn | 10 +++++---- scenes/entities/plants/sunflower.tscn | 11 +++++++--- scenes/templates/plant_template.tscn | 7 +++++-- scripts/components/Entity.cs | 17 ++++++++------- .../components/TimeScalableAnimationTree.cs | 17 +++++++++++++++ .../TimeScalableAnimationTree.cs.uid | 1 + scripts/components/TimeScalableTimer.cs | 21 +++++++++++++++++++ scripts/components/TimeScalableTimer.cs.uid | 1 + 11 files changed, 83 insertions(+), 24 deletions(-) create mode 100644 scripts/components/TimeScalableAnimationTree.cs create mode 100644 scripts/components/TimeScalableAnimationTree.cs.uid create mode 100644 scripts/components/TimeScalableTimer.cs create mode 100644 scripts/components/TimeScalableTimer.cs.uid diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn index a4db44c..47f2b94 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=29 format=3 uid="uid://co11v3w8hbwgf"] +[gd_scene load_steps=30 format=3 uid="uid://co11v3w8hbwgf"] [ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"] [ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="2_4pdxh"] @@ -12,6 +12,7 @@ [ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="7_b3p4o"] [ext_resource type="AnimationNodeStateMachine" uid="uid://dj0blope85bg7" path="res://resources/animations/zombies/basic_zombie_tree.tres" id="8_ckb7n"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="10_ruqsf"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/components/TimeScalableAnimationTree.cs" id="11_ccrjo"] [ext_resource type="AudioStream" uid="uid://dyid55nhflwyn" path="res://assets/audio/sfx/chomp_generic.tres" id="11_vjrlo"] [ext_resource type="AudioStream" uid="uid://bg76miyscfvhu" path="res://assets/audio/sfx/groan.tres" id="12_ad42i"] [ext_resource type="Script" uid="uid://cnn0ymuhypdff" path="res://scripts/audio/ChannelPlaylist.cs" id="12_he8da"] @@ -62,7 +63,6 @@ _data = { [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"] [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_ccrjo"] -graph_offset = Vector2(-447, 53) nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_2q05d") nodes/TimeScale/position = Vector2(60, 120) nodes/Tree/node = ExtResource("8_ckb7n") @@ -115,11 +115,13 @@ libraries = { &"basic_zombie": ExtResource("6_ckb7n") } -[node name="AnimationTree" type="AnimationTree" parent="."] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] tree_root = SubResource("AnimationNodeBlendTree_ccrjo") advance_expression_base_node = NodePath("../Eatbox") anim_player = NodePath("../AnimationPlayer") parameters/TimeScale/scale = 1.0 +script = ExtResource("11_ccrjo") +entity = NodePath("..") [node name="Mover" type="Node" parent="."] script = ExtResource("4_u5syx") diff --git a/scenes/entities/plants/aloe.tscn b/scenes/entities/plants/aloe.tscn index 9047d01..4aeb856 100644 --- a/scenes/entities/plants/aloe.tscn +++ b/scenes/entities/plants/aloe.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=20 format=3 uid="uid://bw1w8jp0yeypy"] +[gd_scene load_steps=21 format=3 uid="uid://bw1w8jp0yeypy"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_n25yi"] [ext_resource type="Texture2D" uid="uid://b6tyoa5htapir" path="res://assets/sprites/atlases/plants/aloe.png" id="2_iup5p"] [ext_resource type="AnimationLibrary" uid="uid://bgutjc3ruq27s" path="res://resources/animations/plants/aloe.res" id="3_3sp3b"] [ext_resource type="Script" uid="uid://cljytsmqac0w7" path="res://scripts/components/plants/behaviours/AloeBehaviour.cs" id="4_55asm"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="5_gfy6j"] [sub_resource type="Animation" id="Animation_vknky"] length = 0.001 @@ -118,9 +119,11 @@ parameters/Tree/conditions/heal = false script = ExtResource("4_55asm") _hpTreshold = 0.33 -[node name="Timer" type="Timer" parent="Behaviour" index="0"] +[node name="Timer" type="Timer" parent="Behaviour" index="0" node_paths=PackedStringArray("entity")] wait_time = 20.0 one_shot = true +script = ExtResource("5_gfy6j") +entity = NodePath("../..") [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] shape = SubResource("RectangleShape2D_oe0dc") diff --git a/scenes/entities/plants/peashooter.tscn b/scenes/entities/plants/peashooter.tscn index aee5b0e..853fb21 100644 --- a/scenes/entities/plants/peashooter.tscn +++ b/scenes/entities/plants/peashooter.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=23 format=3 uid="uid://dy41q1kxray5t"] +[gd_scene load_steps=24 format=3 uid="uid://dy41q1kxray5t"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_pyk3o"] [ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="2_14qlx"] @@ -6,6 +6,7 @@ [ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/components/plants/Shooter.cs" id="3_a4ew1"] [ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="4_saxds"] [ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/components/plants/behaviours/PeashooterBehaviour.cs" id="5_7qiua"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="6_q58jr"] [ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/components/plants/Eyesight.cs" id="7_2bki8"] [ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="8_nl4jc"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="9_mbbd7"] @@ -97,9 +98,11 @@ script = ExtResource("3_a4ew1") _projectile = ExtResource("4_saxds") _timer = NodePath("Timer") -[node name="Timer" type="Timer" parent="Shooter" index="0"] +[node name="Timer" type="Timer" parent="Shooter" index="0" node_paths=PackedStringArray("entity")] wait_time = 1.5 one_shot = true +script = ExtResource("6_q58jr") +entity = NodePath("../..") [node name="Behaviour" type="Node" parent="." index="4" node_paths=PackedStringArray("_shootTimer", "_sight")] script = ExtResource("5_7qiua") diff --git a/scenes/entities/plants/potato_mine.tscn b/scenes/entities/plants/potato_mine.tscn index 4a12b17..c3cf489 100644 --- a/scenes/entities/plants/potato_mine.tscn +++ b/scenes/entities/plants/potato_mine.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=26 format=3 uid="uid://b5x35v3w2u8dx"] +[gd_scene load_steps=27 format=3 uid="uid://b5x35v3w2u8dx"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_dj7ul"] [ext_resource type="Texture2D" uid="uid://c77o6ba0mw7a3" path="res://assets/sprites/atlases/plants/potato_mine.png" id="2_sneas"] @@ -8,6 +8,7 @@ [ext_resource type="PackedScene" uid="uid://ckanq33rao1ur" path="res://scenes/particles/potato_explosion.tscn" id="5_px4r0"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_b1j2f"] [ext_resource type="AudioStream" uid="uid://dltjtpyfr1so0" path="res://assets/audio/sfx/potato_mine.mp3" id="8_3vqdc"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="8_824aq"] [ext_resource type="AudioStream" uid="uid://b27om1bw1x04e" path="res://assets/audio/sfx/dirt_rise.mp3" id="9_3vqdc"] [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_3vqdc"] @@ -58,7 +59,6 @@ transitions = ["Start", "potato_mine_idle_unprimed", SubResource("AnimationNodeS graph_offset = Vector2(-16.3438, -67.832) [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_824aq"] -graph_offset = Vector2(-427, 79) nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_3vqdc") nodes/TimeScale/position = Vector2(100, 120) nodes/Tree/node = SubResource("AnimationNodeStateMachine_nfn7b") @@ -84,7 +84,7 @@ MaxHP = 20.0 texture = ExtResource("2_sneas") hframes = 7 vframes = 4 -frame = 14 +frame = 7 [node name="AnimationPlayer" parent="." index="1"] libraries = { @@ -123,10 +123,12 @@ audioStream = ExtResource("8_3vqdc") channel = "explosion" metadata/_custom_type_script = "uid://c36bj8u7jghc7" -[node name="PrimeTimer" type="Timer" parent="." index="5"] +[node name="PrimeTimer" type="Timer" parent="." index="5" node_paths=PackedStringArray("entity")] wait_time = 15.0 one_shot = true autostart = true +script = ExtResource("8_824aq") +entity = NodePath("..") [node name="Behaviour" type="Node" parent="." index="6" node_paths=PackedStringArray("_hitbox", "_unprimedShape", "_primedShape")] script = ExtResource("4_twx65") diff --git a/scenes/entities/plants/sunflower.tscn b/scenes/entities/plants/sunflower.tscn index cb0c035..967f77c 100644 --- a/scenes/entities/plants/sunflower.tscn +++ b/scenes/entities/plants/sunflower.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=3 uid="uid://bg7lomiorxo2c"] +[gd_scene load_steps=19 format=3 uid="uid://bg7lomiorxo2c"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_bikjn"] [ext_resource type="Texture2D" uid="uid://b3tuidu8dag8u" path="res://assets/sprites/atlases/plants/sunflower.png" id="2_fwcda"] @@ -6,6 +6,7 @@ [ext_resource type="Script" uid="uid://b71gebny84s81" path="res://scripts/components/plants/PlantSunSpawner.cs" id="3_te0pl"] [ext_resource type="PackedScene" uid="uid://bpekho7leatr5" path="res://scenes/sun.tscn" id="4_b8hls"] [ext_resource type="Script" uid="uid://bth7gah4tn7uj" path="res://scripts/components/plants/behaviours/SunflowerBehaviour.cs" id="5_26je0"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="7_rlkb7"] [sub_resource type="Animation" id="Animation_bfx6v"] length = 0.001 @@ -92,13 +93,17 @@ _amountPerSun = 25 [node name="Behaviour" type="Node" parent="." index="4"] script = ExtResource("5_26je0") -[node name="Timer" type="Timer" parent="Behaviour" index="0"] +[node name="Timer" type="Timer" parent="Behaviour" index="0" node_paths=PackedStringArray("entity")] wait_time = 24.25 +script = ExtResource("7_rlkb7") +entity = NodePath("../..") -[node name="StartTimer" type="Timer" parent="Behaviour" index="1"] +[node name="StartTimer" type="Timer" parent="Behaviour" index="1" node_paths=PackedStringArray("entity")] wait_time = 12.0 one_shot = true autostart = true +script = ExtResource("7_rlkb7") +entity = NodePath("../..") [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] position = Vector2(0, 4) diff --git a/scenes/templates/plant_template.tscn b/scenes/templates/plant_template.tscn index 685838b..6404adc 100644 --- a/scenes/templates/plant_template.tscn +++ b/scenes/templates/plant_template.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=2 format=3 uid="uid://b1hjjbdwf1rtc"] +[gd_scene load_steps=3 format=3 uid="uid://b1hjjbdwf1rtc"] [ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/components/plants/RuntimePlantData.cs" id="1_324sd"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/components/TimeScalableAnimationTree.cs" id="2_e75pf"] [node name="PlantTemplate" type="Node2D"] script = ExtResource("1_324sd") @@ -10,8 +11,10 @@ use_parent_material = true [node name="AnimationPlayer" type="AnimationPlayer" parent="."] -[node name="AnimationTree" type="AnimationTree" parent="."] +[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] anim_player = NodePath("../AnimationPlayer") +script = ExtResource("2_e75pf") +entity = NodePath("..") [node name="Hitbox" type="Area2D" parent="."] collision_layer = 2 diff --git a/scripts/components/Entity.cs b/scripts/components/Entity.cs index 5d09167..01e4254 100644 --- a/scripts/components/Entity.cs +++ b/scripts/components/Entity.cs @@ -4,6 +4,7 @@ using Newlon.Systems.Effects; namespace Newlon.Components; +[GlobalClass] public partial class Entity : Node2D { #region Health points @@ -58,13 +59,13 @@ public partial class Entity : Node2D #endregion #region Effects [Export] private Array _effectImmunities = new(); - private readonly Dictionary _activeEffectSlots = new(); - private readonly Dictionary _effectSlotTimers = new(); + private readonly Dictionary _activeEffectSlots = new(); + private readonly Dictionary _effectSlotTimers = new(); [Signal] public delegate void EffectStartedEventHandler(Effect what); [Signal] public delegate void EffectEndedEventHandler(Effect what); [Signal] public delegate void EffectContinuedEventHandler(Effect what); - + public virtual void GiveEffect(Effect what) { @@ -108,7 +109,7 @@ public partial class Entity : Node2D var timer = new Timer() { Autostart = false, OneShot = true }; AddChild(timer); timer.Timeout += () => { EndEffectAtSlot(key); }; - + _effectSlotTimers.Add(key, timer); } @@ -120,7 +121,7 @@ public partial class Entity : Node2D public void ProcessEffects() { - foreach(string key in _activeEffectSlots.Keys) + foreach (string key in _activeEffectSlots.Keys) _activeEffectSlots[key]?.Process(this); } @@ -148,8 +149,8 @@ public partial class Entity : Node2D #endregion #region Godot overrides public override void _Ready() - { - HP = MaxHP; - } + { + HP = MaxHP; + } #endregion } diff --git a/scripts/components/TimeScalableAnimationTree.cs b/scripts/components/TimeScalableAnimationTree.cs new file mode 100644 index 0000000..e7206cd --- /dev/null +++ b/scripts/components/TimeScalableAnimationTree.cs @@ -0,0 +1,17 @@ +using Godot; + +namespace Newlon.Components; + +public partial class TimeScalableAnimationTree : AnimationTree +{ + [Export] private Entity entity; + public override void _Ready() + { + entity.OnLocalTimescaleChanged += OnTimescaleChanged; + } + + private void OnTimescaleChanged(float timescale) + { + Set("parameters/TimeScale/scale", timescale); + } +} diff --git a/scripts/components/TimeScalableAnimationTree.cs.uid b/scripts/components/TimeScalableAnimationTree.cs.uid new file mode 100644 index 0000000..f44c2c0 --- /dev/null +++ b/scripts/components/TimeScalableAnimationTree.cs.uid @@ -0,0 +1 @@ +uid://dwlwi42smgxkb diff --git a/scripts/components/TimeScalableTimer.cs b/scripts/components/TimeScalableTimer.cs new file mode 100644 index 0000000..a6e5c51 --- /dev/null +++ b/scripts/components/TimeScalableTimer.cs @@ -0,0 +1,21 @@ +using Godot; + +namespace Newlon.Components; + +public partial class TimeScalableTimer : Timer +{ + [Export] private Entity entity; + + private float internal_timescale; + public override void _Ready() + { + internal_timescale = entity.LocalTimescale; + entity.OnLocalTimescaleChanged += OnTimescaleChanged; + } + + private void OnTimescaleChanged(float timescale) + { + WaitTime *= internal_timescale / timescale; + internal_timescale = timescale; + } +} diff --git a/scripts/components/TimeScalableTimer.cs.uid b/scripts/components/TimeScalableTimer.cs.uid new file mode 100644 index 0000000..5e713e2 --- /dev/null +++ b/scripts/components/TimeScalableTimer.cs.uid @@ -0,0 +1 @@ +uid://c4jy0cnbnx33h From 9820eb944518c4e84a2827b8f00c85fdeb4a09fe Mon Sep 17 00:00:00 2001 From: Rendo Date: Tue, 8 Jul 2025 00:25:14 +0500 Subject: [PATCH 14/14] EffectBasedPlayer channel settings --- scenes/entities/Zombies/zombie.tscn | 9 ++++++++- scripts/audio/EffectBasedPlayer.cs | 8 +++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn index 47f2b94..60dabed 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=30 format=3 uid="uid://co11v3w8hbwgf"] +[gd_scene load_steps=32 format=3 uid="uid://co11v3w8hbwgf"] [ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"] [ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="2_4pdxh"] @@ -20,6 +20,7 @@ [ext_resource type="Script" uid="uid://b8r6fxsfjdo3a" path="res://scripts/audio/EffectBasedPlayer.cs" id="17_ltj46"] [ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://resources/effects/GarlicEffect.tres" id="18_2q05d"] [ext_resource type="Resource" uid="uid://7uj0oe656jfx" path="res://resources/effects/SnowSlow.tres" id="19_ccrjo"] +[ext_resource type="Script" uid="uid://c1x4n4nqyq72f" path="res://scripts/audio/ChannelSettings.cs" id="21_xnora"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_63ls2"] resource_local_to_scene = true @@ -76,6 +77,11 @@ flat_value = 0.2 percentage_value = 0.0 mult_value = 1.0 +[sub_resource type="Resource" id="Resource_dn8ha"] +script = ExtResource("21_xnora") +restartTreshold = -1.0 +metadata/_custom_type_script = "uid://c1x4n4nqyq72f" + [node name="Zombie" type="Node2D"] y_sort_enabled = true script = ExtResource("1_qq3f1") @@ -157,6 +163,7 @@ autostart = true script = ExtResource("17_ltj46") effectsToMap = Array[Resource]([ExtResource("18_2q05d"), ExtResource("19_ccrjo")]) streamsToMapTo = Array[AudioStream]([ExtResource("2_hh4qh"), ExtResource("3_ltj46")]) +streamSettings = Array[Object]([null, SubResource("Resource_dn8ha")]) [connection signal="OnDamaged" from="." to="HitPlayer" method="Play"] [connection signal="OnHPChanged" from="." to="CanvasGroup" method="DamageFlash"] diff --git a/scripts/audio/EffectBasedPlayer.cs b/scripts/audio/EffectBasedPlayer.cs index 1713e94..786d853 100644 --- a/scripts/audio/EffectBasedPlayer.cs +++ b/scripts/audio/EffectBasedPlayer.cs @@ -8,20 +8,22 @@ public partial class EffectBasedPlayer : Node { [Export] public Array effectsToMap; [Export] public Array streamsToMapTo; - private System.Collections.Generic.Dictionary effectToAudioMap = new(); + [Export] public Array streamSettings; + private System.Collections.Generic.Dictionary effectToAudioMap = new(); public override void _Ready() { GetParent().EffectStarted += OnEffectStarted; for (int i = 0; i < effectsToMap.Count; i++) { - effectToAudioMap.Add(effectsToMap[i], streamsToMapTo[i]); + effectToAudioMap.Add(effectsToMap[i], (streamsToMapTo[i],streamSettings[i])); } } public void OnEffectStarted(Effect what) { if (effectToAudioMap.ContainsKey(what) == false) return; - AudioSequencer.Play(what.Slot, effectToAudioMap[what]); + AudioSequencer.Play(what.Slot, effectToAudioMap[what].Item1); + AudioSequencer.ChangeSettings(what.Slot, effectToAudioMap[what].Item2); } }