Example #1
0
        private void initAnimations()
        {
            m_Animations = new CompositeAnimator(this);

            CompositeAnimator deathAnimation = new CompositeAnimator(
                k_DeathAnimationName,
                TimeSpan.FromSeconds(2),
                this,
                new FadeAnimator(TimeSpan.FromSeconds(2)),
                new BlinkAnimator(TimeSpan.FromMilliseconds(250), TimeSpan.FromSeconds(2)),
                new ShrinkAnimator(TimeSpan.FromSeconds(2)));

            deathAnimation.Finished += handleDeathAnimationFinished;

            m_Animations.Add(deathAnimation);
        }
Example #2
0
        private void initAnimations()
        {
            m_Animations = new CompositeAnimator(this);
            SpriteAnimator hitAnimation = new BlinkAnimator(k_HitAnimationName, TimeSpan.FromSeconds(1 / 10), TimeSpan.FromSeconds(2));
            m_Animations.Add(hitAnimation);

            CompositeAnimator deathAnimation = new CompositeAnimator(
                k_DeathAnimationName,
                TimeSpan.FromSeconds(2),
                this,
                new FadeAnimator(TimeSpan.FromSeconds(2)),
                new RotateAnimator(4, TimeSpan.FromSeconds(2)));

            deathAnimation.Finished += handleDeathAnimationFinished;
            m_Animations.Add(deathAnimation);
        }
Example #3
0
        private void initAnimations()
        {
            m_Animations = new CompositeAnimator(this);

            CompositeAnimator deathAnimation = new CompositeAnimator(
                k_DeathAnimationName,
                TimeSpan.FromSeconds(k_DeathAnimationTime),
                this,
                new ShrinkAnimator(TimeSpan.FromSeconds(k_DeathAnimationTime)),
                new RotateAnimator(5, TimeSpan.FromSeconds(k_DeathAnimationTime)));

            deathAnimation.Finished += handleDeathAnimationFinished;
            m_Animations.Add(deathAnimation);
        }