示例#1
0
 public void update(double dt)
 {
     if (hasStripe)
     {
         stripe.update(dt);
     }
     if (stack.Count > 0)
     {
         UiElement top = stack[stack.Count - 1];
         top.update(dt);
         while (stack.Count > 0 && stack[stack.Count - 1].finished)
         {
             stack.RemoveAt(stack.Count - 1);
             locations.RemoveAt(locations.Count - 1);
         }
     }
 }
示例#2
0
 public void update(double dt)
 {
     if (leftElement != null)
     {
         leftElement.update(dt);
     }
     if (rightElement != null)
     {
         rightElement.update(dt);
         stripeRight = new Vector2(Game1.INTERNAL_WIDTH - rightElement.size.X, STRIPE_START);
     }
     if (centerElement != null)
     {
         centerElement.update(dt);
         stripeCenter = new Vector2(Math.Max(0, (int)(Game1.INTERNAL_WIDTH - centerElement.size.X) / 2),
                                    Math.Max(STRIPE_START, (int)(Game1.INTERNAL_HEIGHT - centerElement.size.Y) / 2));
     }
 }