示例#1
0
        public override void Update(float timeStep)
        {
            timeStep /= Duration;
            consumed  = consumed >= 1 ? 0 : consumed += timeStep;
            var currentpos = Node.Position + (Node.Direction * TargetPos.DistanceToPoint(Node.Position));

            if (TargetPos != currentpos)
            {
                var ease = EaseMath.ElasticIn(consumed);
                Node.LookAt(getposition(currentpos, TargetPos, ease));
            }
            else
            {
                PostUpdate();
                consumed = 0;
            }
        }
示例#2
0
        public override void Update(float timeStep)
        {
            timeStep /= Duration;
            //if (TargetPos == null) TargetPos = node_.Position;
            consumed = consumed >= 1 ? 0 : consumed += timeStep;

            if (TargetPos != Node.Position)
            {
                var ease = EaseMath.ElasticIn(consumed);
                Node.Position = getposition(Node.Position, TargetPos, ease);
            }
            else
            {
                consumed = 0;
                PostUpdate();
            }
        }