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

public class Ship : Singleton<Ship> {
    [SerializeField] private GameObject shipGameObject;
    [SerializeField] private Animator shipAnmAnimator;

    private bool sunk = false;

    public void Activate() {
        shipGameObject.SetActive(true);
    }

    public void Sink() {
        if (sunk) return;
        sunk = true;
        shipAnmAnimator.SetTrigger("Sink");
    }

    public void Unsink() {
        if (!sunk) return;
        sunk = false;
        shipAnmAnimator.SetTrigger("Unsink");
    }
}
