movement and dialogue system
This commit is contained in:
parent
977e666577
commit
1590b5faa6
123 changed files with 62825 additions and 355 deletions
24
Assets/Scripts/Entity/Entity.cs
Normal file
24
Assets/Scripts/Entity/Entity.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class Entity : MonoBehaviour
|
||||
{
|
||||
[Header("Movement")]
|
||||
public float speed;
|
||||
[SerializeField] protected Rigidbody2D rb;
|
||||
public Vector3 moveDirection;
|
||||
public bool noMovement;
|
||||
protected virtual void Movement()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (!noMovement)
|
||||
{
|
||||
Movement();
|
||||
rb.linearVelocity = moveDirection * speed;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue