private TileChecker tileChecker; // 타일 체커 // 초기화 private void Awake() { if (instance == null) { instance = this; } Parser.Init(); targetScene = "MainScene"; tileChecker = GetComponent <TileChecker>(); }
private void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Bursh")) { BasePlayer player = other.gameObject.GetComponentInParent <BasePlayer>(); tileMat.color = PlayerColorManager.GetColor(player.brushColor); TileType newType = PlayerColorManager.GetTileType(tileMat.color); TileChecker.ChangeOneTile(tileType, newType); tileType = newType; TileChecker.RefreshPercent(); } }
// Use this for initialization void Start() { Debug.Log("Map Gen"); TileChecker.Reset(); tileResource = Resources.Load <GameObject>(path: "GameScene/BaseTitle"); GeneratorMap(); TileChecker.totalCount = (int)(mapSize.x * mapSize.y); TileChecker.tileCount[0] = TileChecker.totalCount; TileChecker.RefreshPercent(); //GameObject.FindWithTag("SoundManager").GetComponent<SoundManager>().BgmIngame(); Debug.Log("pc2 : " + UIManager.playerCount); for (int i = 3; i >= UIManager.playerCount; i--) { players[i].SetActive(false); } GameObject.FindGameObjectWithTag("StageArea").GetComponent <ItemSpawnManager>().enabled = false; }