From 2621093d7d4e07d1b2088af3a69a4c48dd6f81a5 Mon Sep 17 00:00:00 2001 From: m0_75251201 Date: Tue, 15 Jul 2025 13:58:03 +0800 Subject: [PATCH] =?UTF-8?q?(client)=20chore:=E6=B5=8B=E8=AF=95=E7=93=A6?= =?UTF-8?q?=E7=89=87=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/Assets/Scripts/Data/MapDefine.cs | 12 +++++++++++- Client/Assets/Scripts/Map/DoubleMap.cs | 21 ++++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/Client/Assets/Scripts/Data/MapDefine.cs b/Client/Assets/Scripts/Data/MapDefine.cs index 0484eda..2cedc51 100644 --- a/Client/Assets/Scripts/Data/MapDefine.cs +++ b/Client/Assets/Scripts/Data/MapDefine.cs @@ -8,7 +8,15 @@ namespace Data { 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 @@ -37,4 +45,6 @@ namespace Data return true; } } + + } \ No newline at end of file diff --git a/Client/Assets/Scripts/Map/DoubleMap.cs b/Client/Assets/Scripts/Map/DoubleMap.cs index 654ea9b..2d88a58 100644 --- a/Client/Assets/Scripts/Map/DoubleMap.cs +++ b/Client/Assets/Scripts/Map/DoubleMap.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using UnityEngine; using UnityEngine.Tilemaps; @@ -13,13 +14,19 @@ namespace Map void Start() { tileDict = Configs.ConfigProcessor.LoadResources("TileMap"); - Debug.Log(tileDict.Count); - } - - // Update is called once per frame - void Update() - { - + var tile= tileDict.Values; + for (int i = 0; i < 100; i++) + { + for (int j = 0; j < 100; j++) + { + textureLevel.SetTile(new(i,j),tile.First()); + } + } } } + + public class TileMappingTable:Utils.Singleton + { + + } }