コード例 #1
0
ファイル: GameManager.cs プロジェクト: DSM-GG/ColorPlus
        private TileChecker tileChecker;                                                                // 타일 체커


        // 초기화
        private void Awake()
        {
            if (instance == null)
            {
                instance = this;
            }

            Parser.Init();

            targetScene = "MainScene";

            tileChecker = GetComponent <TileChecker>();
        }
コード例 #2
0
    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();
        }
    }
コード例 #3
0
    // 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;
    }