Nerdus
This commit is contained in:
parent
f37c5fb87c
commit
2156c6a166
16 changed files with 490 additions and 5 deletions
|
|
@ -5,6 +5,7 @@ namespace Newlon.Systems.Effects;
|
|||
|
||||
public partial class GarlicEffect : Effect
|
||||
{
|
||||
[Export] private float tilesWalked = 0.2f;
|
||||
RandomNumberGenerator RandomNumberGenerator;
|
||||
|
||||
public override void Enter(Node target)
|
||||
|
|
@ -43,9 +44,10 @@ public partial class GarlicEffect : Effect
|
|||
mult = -1;
|
||||
}
|
||||
}
|
||||
zombieData.AbleToEat = false;
|
||||
var tween = zombieData.CreateTween();
|
||||
tween.TweenProperty(zombieData,"position:y",zombieData.GlobalPosition.Y + Utility.TileHeight * mult, 1.0);
|
||||
tween.Parallel().TweenProperty(zombieData, "position:x", zombieData.GlobalPosition.X - Utility.TileWidth / 10.0, 1.0);
|
||||
tween.TweenProperty(zombieData,"position:y",zombieData.GlobalPosition.Y + Utility.TileHeight * mult, Duration);
|
||||
tween.Parallel().TweenProperty(zombieData, "position:x", zombieData.GlobalPosition.X - Utility.TileHeight * tilesWalked, Duration);
|
||||
tween.TweenCallback(Callable.From(() => {zombieData.AbleToEat = true;}));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue