using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Singleton;
using UnityEngine.UI;

public class Kraken : Singleton<Kraken> {

    public int Health = 3;

    public Animator kraken;
    [SerializeField] private Animator windradAnimator;
    public GameObject Windrad;

    public bool milling = false;

    public void EnableWindrad() {
        if (milling) return;
        milling = true;
        Windrad.SetActive(true);
    }

    public void DisableWindrad() {
        if (!milling) return;
        milling = false;
        windradAnimator.SetTrigger("Disappear");
    }

    public void Hurt() {
        Health--;
        print("HURT");

        if (Health <= 0) {
            kraken.SetTrigger("Disappear");
            GameManager.Instance.minigameTwo = false;
        }
    }

}
