Exemple #1
0
        public void AddAnimation(string name, AnimationStrip animation)
        {
            animations[name] = animation;

            if (currentAnimation == null)
            {
                currentAnimation = name;
            }
        }
Exemple #2
0
        public void SpawnParticle(String name, Vector2 location, Vector2 velocity, float lifeSpan, float angularVelocity, bool ignoreCollisions)
        {
            if (!particleList.ContainsKey(name))
            {
                throw new Exception("Particle name " + name + " not defined using AddParticleAnimation");
            }

            AnimationStrip animation = particleList[name];

            Particle p = new Particle(animation.Texture, location, velocity, lifeSpan, angularVelocity, ignoreCollisions, this.map);

            p.AddAnimation("default", animation);



            particles.Add(p);
        }
Exemple #3
0
 public void AddParticleAnimation(string name, AnimationStrip animation)
 {
     particleList.Add(name, animation);
 }