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