using System.Collections;
using System.Collections.Generic;
using Tobii.EyeTracking;
using UnityEngine;
[RequireComponent(typeof(GazeAware))]
public class EnemyLight: BaseEnemy {

    void Awake() {
        base.Start();
    }
    private GazeAware _gazeAware;

    public override void Start() {
        Type = AbilityType.Light;
        _gazeAware = GetComponent<GazeAware>();
        health = 5;
    }

    public override void Update() {
        if(_gazeAware.HasGazeFocus && Input.GetKeyDown(KeyCode.KeypadEnter)) {
            Melt();
        }
        base.Update();
    }

    void Melt() {
        Debug.Log("Melt");
        Health = 0;
        MusicManager.Instance.PlayOneShot(MusicManager.Instance.MapAudio(Sounds.Splat));
        Destroy(this.gameObject);

    }
}
