本文整理汇总了C#中Tweener.SetDelay方法的典型用法代码示例。如果您正苦于以下问题:C# Tweener.SetDelay方法的具体用法?C# Tweener.SetDelay怎么用?C# Tweener.SetDelay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tweener
的用法示例。
在下文中一共展示了Tweener.SetDelay方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Apply
public override void Apply()
{
GearLookValue gv;
bool ct = this.connected;
if (ct)
{
if (!_storage.TryGetValue(_controller.selectedPageId, out gv))
gv = _default;
}
else
gv = _default;
if (_tweener != null)
_tweener.Kill(true);
if (tween && UIPackage._constructing == 0 && !disableAllTweenEffect
&& ct && pageSet.ContainsId(_controller.previousPageId))
{
_owner._gearLocked = true;
_owner.grayed = gv.grayed;
_owner._gearLocked = false;
bool a = gv.alpha != _owner.alpha;
bool b = gv.rotation != _owner.rotation;
if (a || b)
{
_owner.internalVisible++;
_tweener = DOTween.To(() => new Vector2(_owner.alpha, _owner.rotation), val =>
{
_owner._gearLocked = true;
if (a)
_owner.alpha = val.x;
if (b)
_owner.rotation = val.y;
_owner._gearLocked = false;
}, new Vector2(gv.alpha, gv.rotation), tweenTime)
.SetEase(easeType)
.SetUpdate(true)
.OnComplete(() =>
{
_tweener = null;
_owner.internalVisible--;
});
if (delay > 0)
_tweener.SetDelay(delay);
}
}
else
{
_owner._gearLocked = true;
_owner.alpha = gv.alpha;
_owner.rotation = gv.rotation;
_owner.grayed = gv.grayed;
_owner._gearLocked = false;
}
}
示例2: Apply
public override void Apply()
{
GearSizeValue gv;
bool ct = this.connected;
if (ct)
{
if (!_storage.TryGetValue(_controller.selectedPageId, out gv))
gv = _default;
}
else
gv = _default;
if (_tweener != null)
_tweener.Kill(true);
if (tween && UIPackage._constructing == 0 && !disableAllTweenEffect
&& ct && pageSet.ContainsId(_controller.previousPageId))
{
bool a = gv.width != _owner.width || gv.height != _owner.height;
bool b = gv.scaleX != _owner.scaleX || gv.scaleY != _owner.scaleY;
if (a || b)
{
_owner.internalVisible++;
_tweener = DOTween.To(() => new Vector4(_owner.width, _owner.height, _owner.scaleX, _owner.scaleY), v =>
{
_owner._gearLocked = true;
if (a)
_owner.SetSize(v.x, v.y, _owner.gearXY.controller == _controller);
if (b)
_owner.SetScale(v.z, v.w);
_owner._gearLocked = false;
}, new Vector4(gv.width, gv.height, gv.scaleX, gv.scaleY), tweenTime)
.SetEase(easeType)
.SetUpdate(true)
.OnComplete(() =>
{
_tweener = null;
_owner.internalVisible--;
_owner.InvalidateBatchingState();
});
if (delay > 0)
_tweener.SetDelay(delay);
}
}
else
{
_owner._gearLocked = true;
_owner.SetSize(gv.width, gv.height, _owner.gearXY.controller == _controller);
_owner.SetScale(gv.scaleX, gv.scaleY);
_owner._gearLocked = false;
}
}
示例3: Apply
public override void Apply()
{
GearXYValue gv;
if (!_storage.TryGetValue(_controller.selectedPageId, out gv))
gv = _default;
if (tween && UIPackage._constructing == 0 && !disableAllTweenEffect)
{
if(tweener!=null)
{
if (_tweenTarget.x != gv.x || _tweenTarget.y != gv.y)
{
tweener.Kill(true);
tweener = null;
}
else
return;
}
if(_owner.x != gv.x || _owner.y != gv.y)
{
_owner.internalVisible++;
_tweenTarget = gv;
tweener = DOTween.To(() => new Vector2(_owner.x, _owner.y), v =>
{
_owner._gearLocked = true;
_owner.SetXY(v.x, v.y);
_owner._gearLocked = false;
}, new Vector2(gv.x, gv.y), tweenTime)
.SetEase(easeType)
.SetUpdate(true)
.OnComplete(() =>
{
tweener = null;
_owner.internalVisible--;
_owner.InvalidateBatchingState();
});
if (delay > 0)
tweener.SetDelay(delay);
}
}
else
{
_owner._gearLocked = true;
_owner.SetXY(gv.x, gv.y);
_owner._gearLocked = false;
}
}
示例4: SetTweenerComplete
private static void SetTweenerComplete(Tweener tweener, float delay = 0, System.Action doComplete = null)
{
if (delay > 0)
tweener.SetDelay(delay);
tweener.OnComplete(() =>
{
if (doComplete != null)
{
doComplete();
doComplete = null;
}
});
}
示例5: Apply
public override void Apply()
{
GearLookValue gv;
if (!_storage.TryGetValue(_controller.selectedPageId, out gv))
gv = _default;
if (tween && UIPackage._constructing == 0 && !disableAllTweenEffect)
{
_owner._gearLocked = true;
_owner.grayed = gv.grayed;
_owner._gearLocked = false;
if (tweener != null)
{
if (_tweenTarget.alpha != gv.alpha || _tweenTarget.rotation != gv.rotation)
{
tweener.Kill(true);
tweener = null;
}
else
return;
}
bool a = gv.alpha != _owner.alpha;
bool b = gv.rotation != _owner.rotation;
if (a || b)
{
_owner.internalVisible++;
_tweenTarget = gv;
tweener = DOTween.To(() => new Vector2(_owner.alpha, _owner.rotation), val =>
{
_owner._gearLocked = true;
if (a)
_owner.alpha = val.x;
if (b)
_owner.rotation = val.y;
_owner._gearLocked = false;
}, new Vector2(gv.alpha, gv.rotation), tweenTime)
.SetEase(easeType)
.SetUpdate(true)
.OnUpdate(() =>
{
if(b)
_owner.InvalidateBatchingState();
})
.OnComplete(() =>
{
tweener = null;
_owner.internalVisible--;
if (b)
_owner.InvalidateBatchingState();
_owner.OnGearStop.Call(this);
});
if (delay > 0)
tweener.SetDelay(delay);
}
}
else
{
_owner._gearLocked = true;
_owner.alpha = gv.alpha;
_owner.rotation = gv.rotation;
_owner.grayed = gv.grayed;
_owner._gearLocked = false;
}
}
示例6: Apply
public override void Apply()
{
GearColorValue cv;
if (!_storage.TryGetValue(_controller.selectedPageId, out cv))
cv = _default;
if (tween && UIPackage._constructing == 0 && !disableAllTweenEffect)
{
if (tweener != null)
{
if (_tweenTarget.color != cv.color)
{
tweener.Kill(true);
tweener = null;
}
else
return;
}
if (((IColorGear)_owner).color != cv.color)
{
_owner.internalVisible++;
_tweenTarget = cv;
tweener = DOTween.To(() => ((IColorGear)_owner).color, v =>
{
_owner._gearLocked = true;
((IColorGear)_owner).color = v;
_owner._gearLocked = false;
}, cv.color, tweenTime)
.SetEase(easeType)
.SetUpdate(true)
.OnUpdate(() =>
{
_owner.InvalidateBatchingState();
})
.OnComplete(() =>
{
tweener = null;
_owner.internalVisible--;
_owner.InvalidateBatchingState();
_owner.OnGearStop.Call(this);
});
if (delay > 0)
tweener.SetDelay(delay);
}
}
else
{
_owner._gearLocked = true;
((IColorGear)_owner).color = cv.color;
_owner._gearLocked = false;
}
}
示例7: SetDelay
public static void SetDelay(Tweener tweener, float delay)
{
tweener.SetDelay(delay);
}