51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class GameMaster : MonoBehaviour{
|
|
|
|
[HideInInspector] public int gridLength;
|
|
[HideInInspector] public int currentGrid;
|
|
[HideInInspector] public Dictionary<int, bool> grids;
|
|
[HideInInspector] public Dictionary<int, int> enemyType;
|
|
|
|
public static GameMaster instance;
|
|
|
|
public bool finger1;
|
|
public bool finger2;
|
|
public bool finger3;
|
|
public bool finger4;
|
|
public bool finger5;
|
|
|
|
// Start is called before the first frame update
|
|
void Awake(){
|
|
if(instance == null){
|
|
instance = this;
|
|
}else{
|
|
Destroy(gameObject);
|
|
return;
|
|
}
|
|
DontDestroyOnLoad(gameObject);
|
|
}
|
|
|
|
public void LoadGrid(int grid){
|
|
currentGrid = grid;
|
|
Loader.Load(2);
|
|
}
|
|
public void LoadBoss(int grid){
|
|
currentGrid = grid;
|
|
enemyType[grid] = 3;
|
|
Loader.Load(2);
|
|
}
|
|
|
|
public void CompleteGrid(int grid){
|
|
grids[grid] = true;
|
|
Loader.Load(1);
|
|
}
|
|
|
|
public void DestroyGameMaster(){
|
|
instance = null;
|
|
Destroy(gameObject);
|
|
}
|
|
}
|