Effect system and snowpea

This commit is contained in:
Фёдор Веселов 2024-10-02 19:46:51 +05:00
commit e797918e23
18 changed files with 353 additions and 16 deletions

View file

@ -4,7 +4,10 @@ namespace Newlon.Components.Zombies;
public partial class ZombieMover : Node
{
private float _speed;
[Export(hintString: "suffix:tile/sec")]
private float _speedMultiplier = 1.0f;
private float _speed = 1;
private Node2D _zombie;
@ -15,7 +18,12 @@ public partial class ZombieMover : Node
public override void _PhysicsProcess(double delta)
{
_zombie.Position -= _zombie.Transform.X * _speed * (float)delta * Utility.TileWidth * GetParent<RuntimeZombieData>().LocalTimescale;
_zombie.Position -= _zombie.Transform.X
* _speed
* (float)delta
* Utility.TileWidth
* GetParent<RuntimeZombieData>().LocalTimescale
* _speedMultiplier;
}
public void SetSpeed(float speed)