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

public class Timer_Explication : MonoBehaviour
{
    public Canvas Timer_Debut;
    public Canvas explication;
    public Timer_Debut timer_debuts;
    public Canvas explication2;
    public Canvas explication1;
    public bool showExplication = true;


    private void Start()
    {
        // Force stop the boat at start.
        if (Boat.instance != null)
            Boat.instance.Rb.isKinematic = true;
    }

    void Update()
    {
        if ( !showExplication )
        {
            Timer_Debut.enabled = true;
            explication.enabled = false;
            timer_debuts.enabled = true;
            this.enabled = false;
            return;
        }

        if (Input.GetKeyUp(KeyCode.Space))
        {
            if ( explication1.enabled)
            {
                explication1.enabled = false;
                explication2.enabled = true;
                Debug.Log(explication2);

            }
           
            else
            {
                Timer_Debut.enabled = true;
                explication.enabled = false;
                timer_debuts.enabled = true;
            }


           
        }


        
       
        
            
                

        
    }
}
