using UnityEngine; using UnityEngine.Tilemaps; using UnityEngine.UIElements; /// /// can be inherited by MonoBehaviours in order to be added to the level manager /// public abstract class LevelObject : MonoBehaviour, ILevelObject { public Vector3 Position => transform.position; void Awake() { if (LevelManager.Instance.Has(tile => tile.Position.Approximately(Position))) return; LevelManager.Instance.Add(this); } public abstract void LevelStart(); public abstract void LevelDestroy(); public abstract void LevelUpdate(); public abstract bool Equals(ILevelObject other); }