Exemplo n.º 1
0
 public virtual void Update(GameTime gameTime)
 {
     latestGameTime = gameTime;
     if (!active)
     {
         return;
     }
     if (texture != null)
     {
         texture.Update(gameTime, this);
     }
     hitbox.Update(this);
 }
Exemplo n.º 2
0
 public void setTexture(AnimatedTexture tex)
 {
     if (texture != null)
     {
         foreach (Hitbox hitbox in texture.onFrameHitboxes)
         {
             if (hitbox != null)
             {
                 hitbox.active = false;
             }
         }
     }
     texture = tex;
     texture.Update(null, this);
     if (texture.onStart != null)
     {
         texture.onStart();
     }
 }
Exemplo n.º 3
0
 public void setTexture(AnimatedTexture tex)
 {
     if (texture != null)
         foreach (Hitbox hitbox in texture.onFrameHitboxes)
             if (hitbox != null)
             {
                 hitbox.active = false;
             }
     texture = tex;
     texture.Update(null, this);
     if (texture.onStart != null)
         texture.onStart();
 }