12345678910111213141516171819202122232425262728293031 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class AutoAddSpawner : MonoBehaviour
- {
- // Start is called before the first frame update
- public static int DuplicateId = 0;
- void Start()
- {
- AutoAddSpawner.DuplicateId = GameDateManager.Instance.GateID;
- string[] spStr = this.gameObject.name.Split('_');
- if(spStr.Length > 1)
- {
- if(DuplicateId == int.Parse(spStr[1]))
- {
- this.gameObject.SetActive(true);
- }
- else
- {
- this.gameObject.SetActive(false);
- }
- }
- }
- // Update is called once per frame
- void Update()
- {
-
- }
- }
|