示例#1
0
 public void Draw(GameTime gameTime, SpriteBatch spriteBatch, Camera camera)
 {
     GroundLayer?.Draw(gameTime, spriteBatch, TileSet, camera);
     EdgeLayer?.Draw(gameTime, spriteBatch, TileSet, camera);
     BuildingLayer?.Draw(gameTime, spriteBatch, TileSet, camera);
     DecorationLayer?.Draw(gameTime, spriteBatch, TileSet, camera);
 }
示例#2
0
 public void Update(GameTime gameTime)
 {
     GroundLayer?.Update(gameTime);
     EdgeLayer?.Update(gameTime);
     BuildingLayer?.Update(gameTime);
     DecorationLayer?.Update(gameTime);
 }
示例#3
0
 public void FillBuilding()
 {
     for (int y = 0; y < MapHeight; y++)
     {
         for (int x = 0; x < MapWidth; x++)
         {
             BuildingLayer.SetTile(x, y, -1);
         }
     }
 }
示例#4
0
        public void Draw(GameTime gameTime, SpriteBatch spriteBatch, Camera camera)
        {
            if (GroundLayer != null)
            {
                GroundLayer.Draw(gameTime, spriteBatch, TileSet, camera);
            }

            if (EdgeLayer != null)
            {
                EdgeLayer.Draw(gameTime, spriteBatch, TileSet, camera);
            }

            if (BuildingLayer != null)
            {
                BuildingLayer.Draw(gameTime, spriteBatch, TileSet, camera);
            }

            if (DecorationLayer != null)
            {
                DecorationLayer.Draw(gameTime, spriteBatch, TileSet, camera);
            }
        }
示例#5
0
        public void Update(GameTime gameTime)
        {
            if (GroundLayer != null)
            {
                GroundLayer.Update(gameTime);
            }

            if (EdgeLayer != null)
            {
                EdgeLayer.Update(gameTime);
            }

            if (BuildingLayer != null)
            {
                BuildingLayer.Update(gameTime);
            }

            if (DecorationLayer != null)
            {
                DecorationLayer.Update(gameTime);
            }
        }
示例#6
0
    void ResetLayerImage(int state)
    {
        BuildingLayer data = buildingLayerList[state];
        GameObject    obj  = buildingLayerOBJList[state];

        string  imageName = "";
        UIAtlas atlas     = null;

        GameObject characterManager = obj.transform.FindChild("CharacterManager").gameObject;

        if (data.tenantOn == false)
        {
            imageName = "빈 방";

            characterManager.SetActive(false);
        }
        else
        {
            BuildLayerData buildLayerData = BuildDataManager.instance.BuildLayerDataGet(data.buildingKind, data.buildingToggle);

            if (buildLayerData != null)
            {
                imageName = buildLayerData.imageName;
            }

            characterManager.SetActive(true);
        }

        atlas = AtlasLoadManager.instance.GetAtlas(imageName);

        if (atlas != null)
        {
            UISprite imageOBJ = obj.transform.FindChild("BGPanel/BG").GetComponent <UISprite>();

            imageOBJ.atlas      = atlas;
            imageOBJ.spriteName = imageName;
        }
    }
示例#7
0
 public int GetBuildingTile(int x, int y)
 {
     return(BuildingLayer.GetTile(x, y));
 }
示例#8
0
 public void SetBuildingTile(int x, int y, int index)
 {
     BuildingLayer.SetTile(x, y, index);
 }