mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Restored enemy animations
This commit is contained in:
parent
57eb6d1724
commit
e85930df5e
3 changed files with 5 additions and 1 deletions
|
|
@ -100,6 +100,7 @@ public partial class Alert : EnemyStateBase
|
|||
NavigationModule.Move(StorageModule.EnemyData.MovementSpeed);
|
||||
|
||||
StorageModule.FacingDirection = MainObject.Velocity.SnapToCardinal().Normalized();
|
||||
StorageModule.AimingDirection = StorageModule.FacingDirection;
|
||||
}
|
||||
|
||||
private void MoveTowardsPosition(Vector2 position)
|
||||
|
|
|
|||
|
|
@ -172,11 +172,14 @@ public partial class Shooting : EnemyStateBase
|
|||
if (!PlayerDetection.LastKnownPlayerPosition.HasValue) return;
|
||||
|
||||
var direction = GetShootDirection();
|
||||
|
||||
|
||||
|
||||
// Shoot at the player's last known position
|
||||
EquippedWeapon.ShootDirection = direction;
|
||||
//StorageModule.FacingDirection = direction;
|
||||
StorageModule.FacingDirection = direction.SnapToCardinal().Normalized();
|
||||
StorageModule.AimingDirection = StorageModule.FacingDirection;
|
||||
|
||||
EquippedWeapon.Shoot();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue