Ejemplo n.º 1
0
    protected override void OnShow(object userData)
    {
        base.OnShow(userData);

        flowTextData = userData as FlowTextData;
        if (flowTextData == null)
        {
            Log.Error("FlowHPText data is invalid.");
            return;
        }

        // GameEntry.Entity.AttachEntity (this.Id, flowTextData.OwnerId);

        flowText.text  = flowTextData.Text;
        flowText.color = flowTextData.Color.ToColor();

        hideTime = Time.time + 1;

        CachedTransform.localScale = Vector3.one / 2;

        Sequence seq = DOTween.Sequence();

        seq.Append(CachedTransform.DOScale(1, 0.4f))
        .Append(CachedTransform.DOBlendableLocalMoveBy(new Vector3(0.3f, 0.7f, 0), 0.3f))
        .OnComplete(() => { GameEntry.Entity.HideEntity(this.Id); });
    }