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

public class GolemTrigger : MonoBehaviour {
  public bool ForceEat;
  public float EatDistance;
  public bool ForceFear;
  public bool PlayerFoodOverridesFear;

  public int SetBondLevel = 0;

  public bool TriggerOnce = true;

  public bool Triggered = false;

  public GolemTrigger DisableOtherTrigger;

  private void OnTriggerEnter(Collider other) {
    var golem = other.GetComponent<GolemController>();
    if (golem == null) {
      return;
    }

    if (Triggered) {
      return;
    }
    if (TriggerOnce) {
      Triggered = true;
    }
    golem.HandleGolemTrigger(this);
  }
}
