示例#1
0
 public bool TryPreviewSingelMonster(MonsterInfo _info, UITexture _showLabel, PreviewConfigType _previewType)
 {
     curShowLabel = _showLabel;
     CancelAllDownLoad();
     if (_info != null)
     {
         PreviewMob pp = PreviewMob.CreateDummy(_info);
         pp.previewConfigType = _previewType;
         pp.StartAsyncCreate(CreateMonsterCallBack);
         return(true);
     }
     return(false);
 }
示例#2
0
    public bool TryPreviewSingelNPC(int _npcTypeID, UITexture _showLabel, PreviewConfigType _previewType)
    {
        curShowLabel = _showLabel;
        CancelAllDownLoad();
        NPCTypeRef refData = ConfigMng.Instance.GetNPCTypeRef(_npcTypeID);

        if (refData != null)
        {
            PreviewNPC pp = PreviewNPC.CreateDummy(refData);
            pp.previewConfigType = _previewType;
            pp.StartAsyncCreate(CreateNPCCallBack);
            return(true);
        }
        return(false);
    }
示例#3
0
    public bool TryPreviewSingelMonster(int _configID, UITexture _showLabel, PreviewConfigType _previewType)
    {
        curShowLabel = _showLabel;
        CancelAllDownLoad();
        MonsterRef  refData = ConfigMng.Instance.GetMonsterRef(_configID);
        MonsterInfo info    = new MonsterInfo(refData);

        if (info != null)
        {
            PreviewMob pp = PreviewMob.CreateDummy(info);
            pp.previewConfigType = _previewType;
            pp.StartAsyncCreate(CreateMonsterCallBack);
            return(true);
        }
        return(false);
    }
示例#4
0
    /// <summary>
    /// 预览时的相机角度
    /// </summary>
    public Vector3 PreviewRotation(PreviewConfigType _previewType)
    {
        if (RefData != null)
        {
            switch (_previewType)
            {
            case PreviewConfigType.Dialog:
                return(RefData.previewRscale);

            case PreviewConfigType.Task:
                return(RefData.taskpreviewRscale);

            default:
                return(Vector3.zero);
            }
        }
        return(Vector3.zero);
    }
示例#5
0
    /// <summary>
    /// 预览时的缩放比
    /// </summary>
    public float PreviewScale(PreviewConfigType _previewType)
    {
        if (RefData != null)
        {
            switch (_previewType)
            {
            case PreviewConfigType.Dialog:
                return(RefData.preview_scale);

            case PreviewConfigType.Task:
                return(RefData.taskPreviewScale);

            default:
                return(1);
            }
        }
        return(1);
    }
示例#6
0
    /// <summary>
    /// 预览时的相机距离
    /// </summary>
    public Vector3 PreviewPosition(PreviewConfigType _previewType)
    {
        if (TypeRef != null)
        {
            switch (_previewType)
            {
            case PreviewConfigType.Dialog:
                return(TypeRef.previewPscale);

            case PreviewConfigType.Task:
                return(TypeRef.taskpreviewPscale);

            default:
                return(Vector3.zero);
            }
        }
        return(Vector3.zero);
    }