コード例 #1
0
ファイル: Test.cs プロジェクト: luxkun/aiv-tween
        public void TestGreenStart()
        {
            Tween tween = new Tween();

            tween.Call(t => t.Repeat(1));
            tween.Start();
        }
コード例 #2
0
        public void moveTween2(float tweenTime, float xPos, float yPos, float zoom = 1, bool round = false)
        {
            _cameraMoveTween = new Tween(_world, tweenTime);
            _cameraMoveTween.animate("x", -xPos);
            _cameraMoveTween.animate("y", -yPos);
            _cameraMoveTween.transition = Transitions.EASE_OUT;
            _cameraMoveTween.onComplete = Tween.Call(tweenComplete);
            _cameraMoveTween.roundToInt = round;

            _cameraZoomTween = new Tween(_harness, tweenTime);
            _cameraZoomTween.animate("scaleX", zoom);
            _cameraZoomTween.animate("scaleY", zoom);
            _cameraZoomTween.transition = Transitions.EASE_OUT;
            _cameraZoomTween.roundToInt = false;

            _juggler.add(_cameraMoveTween);
            _juggler.add(_cameraZoomTween);
        }