(client) chore:测试瓦片地图
This commit is contained in:
@ -8,7 +8,15 @@ namespace Data
|
|||||||
{
|
{
|
||||||
public class TileDef : Define
|
public class TileDef : Define
|
||||||
{
|
{
|
||||||
|
public string texturePath = "";
|
||||||
|
public string name = "";
|
||||||
|
|
||||||
|
public override bool Init(XElement xmlDef)
|
||||||
|
{
|
||||||
|
base.Init(xmlDef);
|
||||||
|
name = defName;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TileMappingTableDef : Define
|
public class TileMappingTableDef : Define
|
||||||
@ -37,4 +45,6 @@ namespace Data
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Tilemaps;
|
using UnityEngine.Tilemaps;
|
||||||
|
|
||||||
@ -13,13 +14,19 @@ namespace Map
|
|||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
tileDict = Configs.ConfigProcessor.LoadResources<TileBase>("TileMap");
|
tileDict = Configs.ConfigProcessor.LoadResources<TileBase>("TileMap");
|
||||||
Debug.Log(tileDict.Count);
|
var tile= tileDict.Values;
|
||||||
}
|
for (int i = 0; i < 100; i++)
|
||||||
|
{
|
||||||
// Update is called once per frame
|
for (int j = 0; j < 100; j++)
|
||||||
void Update()
|
{
|
||||||
{
|
textureLevel.SetTile(new(i,j),tile.First());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class TileMappingTable:Utils.Singleton<TileMappingTable>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user