Exemple #1
0
    public void ShowMessage(string _msg, Transform _target, Vector2 _offsetV2, float _timer = 1, Action _callback = null)
    {
        Vector2 targetV2 = RectTransformTool.ChildToCanvasCoord(_target, canvasTran);

        BaseSetting(_msg);
        gameObject.SetAnchorPosition(targetV2);
        rectTrans.DOAnchorPos(_offsetV2, _timer).OnComplete(() => { _callback?.Invoke(); });
    }
Exemple #2
0
    public void ShowMessage(string _msg, Transform _startTrans, Transform _endTrans, float _timer = 1, Action _callback = null)
    {
        Vector2 startV2 = RectTransformTool.ChildToCanvasCoord(_startTrans, canvasTran);
        Vector2 endV2   = RectTransformTool.ChildToCanvasCoord(_endTrans, canvasTran);

        BaseSetting(_msg);
        gameObject.SetAnchorPosition(startV2);
        rectTrans.DOAnchorPos(endV2, _timer).OnComplete(() => { _callback?.Invoke(); });
    }