they call me the UI designer (and i'm being real this time)

This commit is contained in:
Sylvia 2026-03-09 05:26:20 -07:00
parent d6da52fd69
commit 2ca43ec836
11 changed files with 1192 additions and 298 deletions

View file

@ -21,12 +21,12 @@ public class Entity : MonoBehaviour
protected void FlipSprite(Vector2 lookDirection)
{
if (lookDirection.x < 0f && isFacingRight)
if (lookDirection.x > 0f && isFacingRight)
{
sprite.flipX = true;
isFacingRight = !isFacingRight;
}
else if (lookDirection.x > 0f && !isFacingRight)
else if (lookDirection.x < 0f && !isFacingRight)
{
sprite.flipX = false;
isFacingRight = !isFacingRight;
@ -37,6 +37,7 @@ public class Entity : MonoBehaviour
if (!stalled)
{
rb.linearVelocity = moveDirection * speed;
FlipSprite(moveDirection);
}
}
public virtual void TakeDamage(float damage, Entity origin)