using UnityEngine;
using System.Collections;
using Framework.Entities;
using Framework.Extensions;
using System.Linq;
using System.Collections.Generic;
using Framework.InteractionSystem;
using Framework.Utility;
using Framework.ActorComponents;
using Project.Actors;

namespace Project.Triggers
{
    public class LordTrigger : CoreBehaviour
    {
        public LordBehaviour lord;

        // Use this for initialization
        protected override void InnerAwake()
        {

        }

        // Update is called once per frame
        protected override void InnerUpdate()
        {

        }

        protected void OnTriggerEnter(Collider collider)
        {
            GameObject other = collider.gameObject;
            if (other.name == "Player")
            {
                this.lord.gameObject.SetActive(true);
                this.lord.Begin();
                Destroy(this.transform.parent.gameObject);
            }
        }
    }
}