public void AddAnimation(string name, AnimationStrip animation) { animations[name] = animation; if (currentAnimation == null) { currentAnimation = name; } }
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); }
public void AddParticleAnimation(string name, AnimationStrip animation) { particleList.Add(name, animation); }