Effect system and snowpea
This commit is contained in:
parent
9b89ae98a6
commit
e797918e23
18 changed files with 353 additions and 16 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue