Example #1
0
        public void InitBlock(MineFieldModel.Tile tile, float tileHeight = 0.1f, float tileSideAngle = 60f)
        {
            this.tile             = tile;
            faceCenter            = tile.face.CalculateCenter();
            faceNormal            = tile.face.CalculateNormal();
            this.tileHeight       = tileHeight;
            tileTopToEdgeDistange = tileHeight * Mathf.Cos(tileSideAngle * Mathf.Deg2Rad);

            transform.position = faceCenter;

            tileBlock.Init();
            tileBase.Init();
            flag.Init();
            mark.InitWithMark();
            mine.Init();
            numberInitialized = false;
        }
 private void OnTileStateChanged(MineFieldModel.Tile tile)
 {
     tileBlocks[tile].UpdateState();
 }