Exemple #1
0
 public ShellExplode( Vector2 pos, float rota )
 {
     shellTexs = CreateTexs();
     shellTexs.SetSpritesParameters( new Vector2( 49, 49 ), pos, 30, 30, rota + MathHelper.PiOver2, Color.White, LayerDepth.Shell, SpriteBlendMode.AlphaBlend );
     shellTexs.Interval = 1;
     shellTexs.Start( 0, 32, true );
 }
Exemple #2
0
        private static AnimatedSpriteSeries CreateTexs()
        {
            AnimatedSpriteSeries result = new AnimatedSpriteSeries( BaseGame.RenderEngine );
            result.LoadSeriesFormContent( BaseGame.RenderEngine, BaseGame.ContentMgr, Path.Combine( Directories.ContentDirectory, "SceneEffects\\ShellExplode\\MulEffect" ),
                0, 32, false );

            return result;
        }
Exemple #3
0
        private void LoadResource(Vector2 pos, float azi)
        {
            animate = new AnimatedSpriteSeries(BaseGame.RenderEngine);
            animate.LoadSeriesFromFiles(BaseGame.RenderEngine, Path.Combine(Directories.ContentDirectory, "Rules\\SpaceWar\\image"), "field_coin_00", ".png", 1, 5, false);
            animate.SetSpritesParameters(new Vector2(32, 32), pos, 1, azi, Color.White, LayerDepth.GroundObj, SpriteBlendMode.AlphaBlend);
            GameManager.AnimatedMgr.Add(animate);
            animate.Interval = 10;
            animate.Start();

        }
Exemple #4
0
        private void InitializeTex(Vector2 pos, float azi)
        {
            normalSprite = new Sprite(BaseGame.RenderEngine);
            normalSprite.LoadTextureFromFile(Path.Combine(Directories.ContentDirectory, "Rules\\SpaceWar\\image\\field_spaceship_001.png"), true);
            normalSprite.SetParameters(new Vector2(16, 16), pos, 1f, azi, Color.White, LayerDepth.TankBase, SpriteBlendMode.AlphaBlend);

            hitingSprite = new Sprite(BaseGame.RenderEngine);
            hitingSprite.LoadTextureFromFile(Path.Combine(Directories.ContentDirectory, "Rules\\SpaceWar\\image\\field_spaceship_002.png"), true);
            hitingSprite.SetParameters(new Vector2(16, 16), pos, 1f, azi, Color.White, LayerDepth.TankBase, SpriteBlendMode.AlphaBlend);

            destoryAnimate = new AnimatedSpriteSeries(BaseGame.RenderEngine);
            destoryAnimate.LoadSeriesFromFiles(BaseGame.RenderEngine, Path.Combine(Directories.ContentDirectory, "Rules\\SpaceWar\\image"), "field_burst_00", ".png", 1, 6, false);
        }