コード例 #1
0
 public void UpdateOutOfBounds()
 {
     if (Topography.IsNotInsideMapBoundaries(Position))
     {
         Die();
     }
 }
コード例 #2
0
        public static void RaonLauncherProjectile2ActiveTornado(Vector2 position)
        {
            Flipbook fb = new Flipbook(position, new Vector2(15.5f, 18.5f), 31, 29, "Graphics/Tank/RaonLauncherMineS2/CharacterSpritesheet",
                                       new AnimationInstance()
            {
                StartingFrame = 20, EndingFrame = 36, TimePerFrame = 1 / 10f
            }, DepthParameter.ProjectileSFX, 0);

            SpecialEffect se = new SpecialEffect(fb, 0);

            float positionMultiplier = 0;

            se.UpdateAction += (specialEffect, gameTime) =>
            {
                if (Topography.IsNotInsideMapBoundaries(se.Flipbook.Position))
                {
                    SpecialEffectHandler.Remove(se);
                }

                se.Flipbook.Position -= new Vector2(0, positionMultiplier);
                se.Flipbook.Rotation += (float)gameTime.ElapsedGameTime.TotalSeconds * positionMultiplier * positionMultiplier * MathHelper.PiOver2;

                positionMultiplier += (float)gameTime.ElapsedGameTime.TotalSeconds;
            };

            SpecialEffectHandler.Add(se);
        }
コード例 #3
0
 private void UpdateElement(GameTime gameTime)
 {
     mobile.Rider.Update();
     mobile.MobileFlipbook.Position += Parameter.AnimationInGameDeathAnimationSpeed * (float)gameTime.ElapsedGameTime.TotalSeconds;
     if (Topography.IsNotInsideMapBoundaries(mobile.MobileFlipbook.Position - new Vector2(0, 300)) && Topography.IsNotInsideMapBoundaries(mobile.MobileFlipbook.Position + new Vector2(0, 300)))
     {
         toBeDestroyedDeathAnimationList.Add(this);
     }
 }
コード例 #4
0
 public override bool CeaseFunction()
 {
     return(Topography.IsNotInsideMapBoundaries(Flipbook.Position) || Flipbook.Color == Color.Transparent);
 }