Exemple #1
0
    public void CreateMountCallBack(PreviewMount _mob)
    {
        //防止有之前延迟的模型加载,再次清理
        ClearModel();
        curPreviewMount = _mob;
        GameObject parent = GetModelTransform(_mob.PreviewPosition, _mob.PreviewRotation);

        if (null != parent)
        {
            _mob.transform.parent           = parent.transform;
            _mob.transform.localPosition    = new Vector3(0, -_mob.Height / 2f, 0);
            _mob.transform.localEulerAngles = new Vector3(0, 180f, 0);
        }
        _mob.FaceToNoLerp(180f);
        UIDragObjectRotate3D _UIDragObjectRotate3D = curShowLabel.gameObject.GetComponent <UIDragObjectRotate3D>();

        if (_UIDragObjectRotate3D == null)
        {
            _UIDragObjectRotate3D = curShowLabel.gameObject.AddComponent <UIDragObjectRotate3D>();
        }
        _UIDragObjectRotate3D.target = _mob;
        BindRenderAndUI(curShowLabel);
    }