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

public class ShowControls : MonoBehaviour
{
    [SerializeField] GameObject m_controlsPrompt, m_controlsPanel;

    // Start is called before the first frame update
    void Awake()
    {
        if (!m_controlsPanel || !m_controlsPrompt)
        {
            gameObject.SetActive(false);
            return;
        }

        m_controlsPrompt.SetActive(true);
        m_controlsPanel.SetActive(false);
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.C))
            SwapPanels();
    }

    void SwapPanels()
    {
        bool promptActive = m_controlsPrompt.activeInHierarchy;

        m_controlsPrompt.SetActive(!promptActive);

        m_controlsPanel.SetActive(promptActive);
    }
}
