예제 #1
0
파일: Gold.cs 프로젝트: ingex0/smarttank
        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();

        }
예제 #2
0
파일: WarShip.cs 프로젝트: ingex0/smarttank
        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);
        }