コード例 #1
0
    private void FillGroundTileData()
    {
        groundTileData = new GroundTileData[tilemapWidth, tilemapHeight];

        for (int i = 0; i < tilemapWidth; i++)
        {
            for (int j = 0; j < tilemapHeight; j++)
            {
                groundTileData[i, j] = new GroundTileData(GroundType.Ground);
                tilemap.SetTile(new Vector3Int(i, j, 0), growthTiles[0]);
            }
        }
    }
コード例 #2
0
 public override void Read(PacketInput input)
 {
     Tiles = new GroundTileData[input.ReadInt16()];
     for (int i = 0; i < Tiles.Length; i++)
     {
         (Tiles[i] = new GroundTileData()).Read(input);
     }
     NewObjects = new ObjectData[input.ReadInt16()];
     for (int i = 0; i < NewObjects.Length; i++)
     {
         (NewObjects[i] = new ObjectData()).Read(input);
     }
     Drops = new int[input.ReadInt16()];
     for (int i = 0; i < Drops.Length; i++)
     {
         Drops[i] = input.ReadInt32();
     }
 }