Exemple #1
0
        /// <summary>
        /// Play the Shot animation and spawn a beam on the targetting position.
        /// </summary>
        /// <param name="position"></param>
        public void Shot(Vector2 position)
        {
            flipbook.AppendAnimationIntoCycle(thorStatePresets[ActorFlipbookState.ShootingS1], true);
            flipbook.AppendAnimationIntoCycle(thorStatePresets[ActorFlipbookState.Active]);

            SpecialEffectBuilder.ThorShot((cannonPosition + position) / 2, beamColor, (float)Helper.EuclideanDistance(cannonPosition, position) / 256, (float)Helper.AngleBetween(cannonPosition, position) - MathHelper.PiOver2);
        }
Exemple #2
0
        public void ChangeState(SatelliteFlipbookState NewState)
        {
            if (SatelliteFlipbookState == NewState)
            {
                return;
            }

            SatelliteFlipbookState = NewState;
            Flipbook.AppendAnimationIntoCycle(new List <AnimationInstance>()
            {
                StatePresets[SatelliteFlipbookState]
            }, true);
        }