当前位置: 首页>>代码示例>>C#>>正文


C# LTDescr.setEase方法代码示例

本文整理汇总了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);
        }
开发者ID:aeonphyxius,项目名称:unity_extensions,代码行数:7,代码来源:EnemyMoveTo.cs

示例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;
        }
    }
开发者ID:FGJ16-TeamDagon,项目名称:RitualOfDagon,代码行数:42,代码来源:GameCharacter.cs

示例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();
 }
开发者ID:vetruven,项目名称:GGJ2016,代码行数:10,代码来源:AnimStep.cs

示例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);
        }
    }
开发者ID:FGJ16-TeamDagon,项目名称:RitualOfDagon,代码行数:33,代码来源:GameCharacter.cs


注:本文中的LTDescr.setEase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。