Example #1
0
 public void AddAnimation(string id, AnimationDefinition animation)
 {
     this.animations.Add(id, animation);
     Logger.Debug("OutObject", "AddAnimation", "Added animation " + id);
     if (id == OutObject.IDLE_ANIMATION)
     {
         this.IdleAnimation = id;
         this.SetAnimation(id);
         Logger.Debug("OutObject", "AddAnimation", "Set idle animation " + id);
     }
 }
Example #2
0
        public void AddParticleTemplate(string texture, int x, int y, int width, int height, float scale = 1f, AnimationDefinition animation = null)
        {
            var rect = new IntRect(x, y, width, height);
            var pt   = new ParticleTemplate()
            {
                animation = animation, texture = texture, textureRect = rect, scale = scale
            };

            this.particleTemplates.Add(pt);
        }