this idiot forgot to commit an entire month's worth of code
This commit is contained in:
parent
c67146ea1a
commit
a3321d361c
51 changed files with 3644 additions and 84 deletions
|
|
@ -11,6 +11,7 @@ public class Entity : MonoBehaviour
|
|||
public bool invincible;
|
||||
[Header("Stats")]
|
||||
public float health;
|
||||
public float baseMaxHealth; //for enemies, mostly.
|
||||
public float maxHealth;
|
||||
|
||||
[Header("Movement")]
|
||||
|
|
@ -18,6 +19,7 @@ public class Entity : MonoBehaviour
|
|||
[SerializeField] protected Rigidbody2D rb;
|
||||
protected Vector2 moveDirection;
|
||||
public float speed;
|
||||
public float speedMultiplier = 1f;
|
||||
|
||||
protected void FlipSprite(Vector2 lookDirection)
|
||||
{
|
||||
|
|
@ -36,7 +38,7 @@ public class Entity : MonoBehaviour
|
|||
{
|
||||
if (!stalled)
|
||||
{
|
||||
rb.linearVelocity = moveDirection * speed;
|
||||
rb.linearVelocity = moveDirection * (speed * speedMultiplier);
|
||||
FlipSprite(moveDirection);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue