Esempio n. 1
0
 private void LoadingProps(MapRootDto mapData)
 {
     mapData.Prefabs.ForEach(x =>
     {
         var o = Instantiate(LoadResourceByIdTool.GetProp(x.PrefabId));
         o.transform.SetParent(Props.transform);
         // 因为原物品可能有坐标
         o.transform.position = new Vector3(o.transform.position.x + x.X, o.transform.position.y + x.Y, 0);
     });
 }
Esempio n. 2
0
        public void RefreshTileInfo()
        {
            // 只有碰撞层的需要加载效果
            if (model == DisplayModel.Crash)
            {
                // 动态加载
                foreach (var effectKey in effectKeys)
                {
                    effects.Add(GlobalEffectRegistry.instance.GetEffect(effectKey));
                }
            }

            sprite = LoadResourceByIdTool.GetTileSprite(tileSpriteId);
        }
Esempio n. 3
0
 public void StartSetBackground(MapRootDto mapData)
 {
     bg.sprite = LoadResourceByIdTool.GetBackgroundSprite(mapData.Background.BgId);
     ColorUtility.TryParseHtmlString(mapData.Background.Color, out var color);
     bg.color = color;
 }