using System.Collections;
using System.Collections.Generic;
using Tobii.EyeTracking;
using UnityEngine;


[RequireComponent(typeof(GazeAware))]
public class ElectricEnemy : BaseEnemy {

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

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

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

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

    }
}
