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

public class Timer_Debut : MonoBehaviour {

    public Timer time;
    public GameObject setup;
    public Canvas timer;
    public Canvas item;
    public Canvas boussole;

    public Canvas timer_debut;

    public float temps = 3;
    public Text timertext;
    public int tempsint;
    bool stop = true;


    // Use this for initialization
    void Start () {
		
	}
	
	// Update is called once per frame
	void Update ()
    {
        tempsint = Mathf.RoundToInt(temps);
        timertext.text = (tempsint + "");
        if (temps >= 0 && stop == true)
        {
            temps -= Time.deltaTime;

           
        }

        else
        {

            time.enabled = true;
            boussole.enabled = true;
            Boat.instance.Rb.isKinematic = false;
            timer.enabled = true;
            item.enabled = true;
            timer_debut.enabled = false;

            this.enabled = false;

        }




    }
}
