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); }
public void Update(GameTime gameTime) { GroundLayer?.Update(gameTime); EdgeLayer?.Update(gameTime); BuildingLayer?.Update(gameTime); DecorationLayer?.Update(gameTime); }
public void FillBuilding() { for (int y = 0; y < MapHeight; y++) { for (int x = 0; x < MapWidth; x++) { BuildingLayer.SetTile(x, y, -1); } } }
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); } }
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); } }
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; } }
public int GetBuildingTile(int x, int y) { return(BuildingLayer.GetTile(x, y)); }
public void SetBuildingTile(int x, int y, int index) { BuildingLayer.SetTile(x, y, index); }