(client) chore:修改了角色的身体结构的定义方式,现在图片资源统一使用ImageDef加载,使用了更节省资源的初始化方式;fix:修复了定义加载数组时只能初始化数组而不能初始化列表的问题

This commit is contained in:
m0_75251201
2025-08-22 20:43:55 +08:00
parent 3e099137a1
commit 8916440e7e
28 changed files with 1411 additions and 954 deletions

View File

@ -10,21 +10,7 @@ namespace Map
public Tilemap buildLevel;
public Tilemap plantLevel;
public void Start()
{
var perline= Utils.PerlinNoise.Instance;
var size = 100;
baseLevel.InitializeData(size, size);
for (var i = 0; i < size; i++) {
for (var j = 0; j < size; j++) {
var dx = i - size/2;
var dy = j - size/2;
baseLevel.mapData[i][j] = (int)(Math.Sqrt(dx*dx + dy*dy) / 5) & 1;
}
}
baseLevel.RefreshAllTiles();
}
public bool CanPassThrough(int x, int y)
{
return GetTilePassCost(x, y) < 1;