本文整理汇总了C#中LTDescr.setEase方法的典型用法代码示例。如果您正苦于以下问题:C# LTDescr.setEase方法的具体用法?C# LTDescr.setEase怎么用?C# LTDescr.setEase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LTDescr
的用法示例。
在下文中一共展示了LTDescr.setEase方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ActionStart
public override void ActionStart()
{
tweenDescriptor = LeanTween.moveLocal(ActionObject, GetMoveToPosition(), MoveToActionData.time);
tweenDescriptor.setEase(EaseType);
tweenDescriptor.setOnComplete(OnFinish);
}
示例2: OnCompletePathStep
void OnCompletePathStep()
{
pathIndex++;
if (pathIndex < path.Count
&& GamePlay.Instance.CurrentPlayer != null
&& GamePlay.Instance.CurrentPlayer.characters.Contains(this)
&& GamePlay.Instance.State == GamePlay.GameplayState.Playing
&& MovementLeft > 0)
{
var target = path[pathIndex];
if (target.occupant != null)
{
path = null;
return;
}
if (tween != null) LeanTween.cancel(gameObject);
var targetPos = target.GetWorldPos();
tween = LeanTween.move(gameObject, target.GetWorldPos(), moveTime);
tween.setEase(LeanTweenType.easeInOutQuad);
Position.occupant = null;
Position = path[pathIndex];
Position.occupant = gameObject;
targetPos.y = transform.position.y;
transform.LookAt(targetPos);
SetUsedMovementPoint(usedMovementPoints + 1);
tween.onComplete = OnCompletePathStep;
if (moveParticles) moveParticles.Play();
SoundManager.Instance.PlaySound(moveSound);
}
else
{
path = null;
}
}
示例3: DoAnim
public void DoAnim()
{
Debug.Log("DoAnim "+gameObject.name);
deamHandLTDesc = LeanTween.move(DemonHand, where2Go, timeToComplete);
//deamHandLTDesc.setDestroyOnComplete(shouldDestroyOnComplete);
deamHandLTDesc.setOnUpdate(OnUpdate);
deamHandLTDesc.setOnComplete(nextStep);
deamHandLTDesc.setEase(easyType);
deamHandLTDesc.init();
}
示例4: MoveTowards
public void MoveTowards(GridPosition target)
{
if (MovementLeft <= 0)
{
if (selection == this) selection = null;
return;
}
var lookPos = target.GetWorldPos();
lookPos.y = transform.position.y;
transform.LookAt(lookPos);
path = GamePlay.Instance.grid.FindPath(Position, target);
if (path.Count > 0)
{
if (tween != null) LeanTween.cancel(gameObject);
SetUsedMovementPoint(usedMovementPoints + 1);
tween = LeanTween.move(gameObject, path[0].GetWorldPos(), moveTime);
tween.setEase(LeanTweenType.easeInOutQuad);
Position.occupant = null;
Position = path[0];
Position.occupant = gameObject;
pathIndex = 0;
tween.onComplete = () =>
{
OnCompletePathStep();
} ;
if (moveParticles) moveParticles.Play();
SoundManager.Instance.PlaySound(moveSound);
}
}