Exemplo n.º 1
0
 public void Update(float elapsed, Camera camera)
 {
     ApplyCamera(camera);
     if (system != null)
     {
         system.Update(elapsed, camera);
     }
 }
Exemplo n.º 2
0
 public virtual void Update(float elapsed, Camera camera, Player player, Map map)
 {
     rect = new Rectangle(new Point((int)x, (int)y), new Size(width, height));
     if (health <= 0)
     {
         dead = true;
     }
     if (dead)
     {
         if (system == null)
         {
             ParticleOptions ops = (new EffectDie(colour, (KillableSprite)this)).template.Clone();
             ops.xPosRange = new Vector(new Point((int)x, (int)x + width));
             ops.yPosRange = new Vector(new Point((int)y, (int)y + height));
             system        = new ParticleSystem(ops);
         }
         system.Update(elapsed, camera);
         return;
     }
 }