示例#1
0
 /// <summary>
 /// 重置对象池对象
 /// </summary>
 public void OnPoolReset()
 {
     _mapVo                = null;
     _blockContainer       = null;
     _texture              = null;
     _material.mainTexture = null;
     _quad.SetActive(false);
 }
示例#2
0
 /// <summary>
 /// 销毁对象池对象
 /// </summary>
 public void OnPoolDispose()
 {
     _mapVo                = null;
     _blockContainer       = null;
     _texture              = null;
     _material.mainTexture = null;
     _material             = null;
     _blockContainer       = null;
     UnityEngine.Object.Destroy(_quad);
     _quad = null;
 }
示例#3
0
文件: Map.cs 项目: goodGsger/EraPro
        /// <summary>
        /// 显示地图
        /// </summary>
        /// <param name="mapVo"></param>
        /// <param name="pos"></param>
        public void Show(MapVo mapVo, Vector2 pos)
        {
            // 切换地图时清理缓存
            if (_mapVo != null)
            {
                Reset();
            }

            _mapVo         = mapVo;
            _control.mapVo = _mapVo;
            _control.SetThumbnailScale(new Vector3(_mapVo.mapWidth, _mapVo.mapHeight, 1));
            SetCenter(pos);
            ShowThumbnail();
            Resize();

            if (_tweener != null)
            {
                _tweener.Kill();
                _tweener = null;
            }
        }