Not perfect but enemies move/attack with animation
This commit is contained in:
@@ -65,6 +65,8 @@ namespace GameJamDungeon
|
||||
|
||||
private PlayerData PlayerData { get; set; } = default!;
|
||||
|
||||
private bool flipAttack = false;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
AnimationPlayer.AnimationFinished += OnAnimationFinished;
|
||||
@@ -120,8 +122,8 @@ namespace GameJamDungeon
|
||||
{
|
||||
var attackSpeed = PlayerData.Inventory.EquippedWeapon.Value.WeaponStats.AttackSpeed;
|
||||
AnimationPlayer.SetSpeedScale((float)attackSpeed);
|
||||
|
||||
AnimationPlayer.Play("attack");
|
||||
SwordSlashAnimation.Play("attack");
|
||||
})
|
||||
.Handle((in PlayerLogic.Output.ThrowItem output) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user