init
This commit is contained in:
commit
fca6784fe7
571 changed files with 84105 additions and 0 deletions
51
Assets/Scripts/Combat/GameMaster.cs
Normal file
51
Assets/Scripts/Combat/GameMaster.cs
Normal file
|
@ -0,0 +1,51 @@
|
|||
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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue