Exemplo n.º 1
0
        public void PutBuild(GroundTile gt, List <GroundTile> GTs)
        {
            SetAlpha(false);
            foreach (var GroundTile in myGroundTiles)
            {
                GroundTile.RemoveBuild(this);
            }
            foreach (var GT in myGroundTiles)
            {
                GT.CheckError();
            }

            myGroundTiles.Clear();
            myGroundTiles.AddRange(GTs);
            foreach (var GT in GTs)
            {
                GT.AddBuild(this);
            }
            foreach (var GT in myGroundTiles)
            {
                GT.CheckError();
            }

            Tr.position = GetVector3(gt);

            if (BuildData != null)
            {
                BuildData.PosX = gt.X;
                BuildData.PosY = gt.Z;
            }

            //Tr.localPosition =new Vector3(0, 0.00437f * (300 - SpIcon.sprite.rect.height),0) + GetVector3(gt.transform.localPosition);
        }