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

public class ItemShow_ClickToAddCase : MonoBehaviour
{
    public bool isShow = false;

    public int step = 1;//步数
    public int[] CaseNums;//case组
    int counter = 0;//计数器

    public void Click()
    {
        if (isShow)
        {
            counter++;
            AddCases();
        }
    }

    /// <summary>
    /// 添加case
    /// </summary>
    void AddCases()
    {
        if (step == counter)
        {
            Map_Details map_Details = GameObject.Find("UI/MapsUI/Details").GetComponent<Map_Details>();
            foreach (int CaseNum in CaseNums)
            {
                map_Details.AddCase(CaseNum);
            }
        }
    }

}
