當前位置: 首頁>>代碼示例>>C#>>正文


C# AnimatedSprite.StartAnimation方法代碼示例

本文整理匯總了C#中AnimatedSprite.StartAnimation方法的典型用法代碼示例。如果您正苦於以下問題:C# AnimatedSprite.StartAnimation方法的具體用法?C# AnimatedSprite.StartAnimation怎麽用?C# AnimatedSprite.StartAnimation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AnimatedSprite的用法示例。


在下文中一共展示了AnimatedSprite.StartAnimation方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Initialize

 public static void Initialize(GraphicsDevice gd, Microsoft.Xna.Framework.Content.ContentManager content)
 {
     DirtCloud = new AnimatedSprite(content.Load<Texture2D>("Art/Z3 Art/Dirt Particle"));
     DirtCloud.DrawArgs.Scale = new Vector2(Scale * 0.25f);
     DirtCloud.SetOriginToCenter();
     DirtCloud.StartAnimation();
 }
開發者ID:nolanmanning703,項目名稱:GGJ2014,代碼行數:7,代碼來源:ParticleAssets3.cs

示例2: Initialize

        public static void Initialize(GraphicsDevice device, ContentManager content)
        {
            HillSprite = new AnimatedSprite(content.Load<Texture2D>("Art/Z3 Art/Hill"));
            HillSprite.SetOriginToCenter();
            HillSprite.StartAnimation();
            HillSprite.DrawArgs.Scale *= 0.5f;

            ConfusedSprite = new AnimatedSprite(content.Load<Texture2D>("Art/Z3 Art/Stunned"), 2, TimeSpan.FromSeconds(0.25), true, -1, 0);
            ConfusedSprite.SetOriginToCenter();
            ConfusedSprite.StartAnimation();

            DogHouseSprite = new AnimatedSprite(content.Load<Texture2D>("Art/Z3 Art/doghouse"));
            DogHouseSprite.SetOriginToCenter();
            DogHouseLowerSprite = new AnimatedSprite(content.Load<Texture2D>("Art/Z3 Art/doghouse lower"));
            DogHouseLowerSprite.SetOriginToCenter();

            HarmonyJousterStill = new AnimatedSprite(content.Load<Texture2D>("Art/Z3 Art/dog_still"), 8, TimeSpan.FromSeconds(0.1), true);
            HarmonyJousterStill.SetOriginToCenter();
            HarmonyJousterStill.StartAnimation();

            DischordJousterStill = new AnimatedSprite(content.Load<Texture2D>("Art/Z3 Art/baddog_still"), 8, TimeSpan.FromSeconds(0.1), true);
            DischordJousterStill.SetOriginToCenter();
            DischordJousterStill.StartAnimation();

            TennisBall = new AnimatedSprite(content.Load<Texture2D>("Art/Z3 Art/tennisball"));
            TennisBall.SetOriginToCenter();
            TennisBall.StartAnimation();
        }
開發者ID:heyx3,項目名稱:GGJ2014,代碼行數:28,代碼來源:ArtAssets3.cs

示例3: Initialize

        public static void Initialize(GraphicsDevice device, ContentManager content)
        {
            BlackHole = new AnimatedSprite(content.Load<Texture2D>("Art/Z5 Art/Black Hole"), 6, TimeSpan.FromSeconds(0.1), true);
            BlackHole.SetOriginToCenter();
            BlackHole.StartAnimation();

            Ring = new AnimatedSprite(content.Load<Texture2D>("Art/Z5 Art/Ring"));
            Ring.SetOriginToCenter();
            Ring.StartAnimation();
        }
開發者ID:nolanmanning703,項目名稱:GGJ2014,代碼行數:10,代碼來源:ArtAssets5.cs

示例4: Initialize

        public static void Initialize(GraphicsDevice device, ContentManager content)
        {
            GoodBacteria = new AnimatedSprite(content.Load<Texture2D>("Art/Z1 Art/Pickup Good"), 8, TimeSpan.FromSeconds(0.1), true);
            GoodBacteria.SetOriginToCenter();
            GoodBacteria.StartAnimation();

            InfectedBacteria = new AnimatedSprite(content.Load<Texture2D>("Art/Z1 Art/Pickup Infected"), 8, TimeSpan.FromSeconds(0.1), true);
            InfectedBacteria.SetOriginToCenter();
            InfectedBacteria.StartAnimation();

            Spikes = new AnimatedSprite(content.Load<Texture2D>("Art/Z1 Art/amoeba_spikes"), 8, ArtAssets.PlayerSprites[ZoomLevels.One][Jousting.Jousters.Harmony].FrameLength, true);
            Spikes.SetOriginToCenter();
            Spikes.StartAnimation();

            Aura = new AnimatedSprite(content.Load<Texture2D>("Art/Z1 Art/aura"));
            Aura.DrawArgs.Scale *= 2.0f;
            Aura.SetOriginToCenter();
            Aura.StartAnimation();
        }
開發者ID:nolanmanning703,項目名稱:GGJ2014,代碼行數:19,代碼來源:ArtAssets1.cs

示例5: Initialize

        public static void Initialize(GraphicsDevice gd, Microsoft.Xna.Framework.Content.ContentManager content)
        {
            GoodParticle = new AnimatedSprite(content.Load<Texture2D>("Art/Z1 Art/GoodParticle"));
            GoodParticle.SetOriginToCenter();
            GoodParticle.StartAnimation();
            GoodParticle.DrawArgs.Scale = new Vector2(Scale * 0.25f);

            BadParticle = new AnimatedSprite(content.Load<Texture2D>("Art/Z1 Art/InfectedParticle"));
            BadParticle.SetOriginToCenter();
            BadParticle.StartAnimation();
            BadParticle.DrawArgs.Scale = new Vector2(Scale * 0.25f);

            CollectGoodParticle = new AnimatedSprite(content.Load<Texture2D>("Art/Z1 Art/Collected Particle Good"));
            CollectGoodParticle.SetOriginToCenter();
            CollectGoodParticle.DrawArgs.Scale = new Vector2(Scale);

            CollectBadParticle = new AnimatedSprite(content.Load<Texture2D>("Art/Z1 Art/Collected Particle Bad"));
            CollectBadParticle.SetOriginToCenter();
            CollectBadParticle.DrawArgs.Scale = new Vector2(Scale);

            InfectBacteriaParticle = new AnimatedSprite(content.Load<Texture2D>("Art/Z1 Art/MadeInfectedParticle"));
            InfectBacteriaParticle.SetOriginToCenter();
            InfectBacteriaParticle.DrawArgs.Scale = new Vector2(Scale * 0.65f);
        }
開發者ID:nolanmanning703,項目名稱:GGJ2014,代碼行數:24,代碼來源:ParticleAssets1.cs


注:本文中的AnimatedSprite.StartAnimation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。