using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RelicGGJ;

public class EnemyController : GridObject
{

    public override void Init(gridLayer layer)
    {
        base.Init(layer);
        m_layer = layer;
        GridController controller = GetComponentInParent<GridController>();
        if (controller)
        {
            m_level = controller;
        }
    }

    public virtual Vector2 GetTarget()
    {
        return m_position;
    }

    public override void GameTick()
    {
        Vector2 newPos = GetTarget();
        Move(ref newPos);
        UpdatePosition();
    }
}
