Beispiel #1
0
 public void RecreateBoxAt(Vector2 position, Vector2 velocity)
 {
     if (BoxAlive != null)
     {
         world.RemoveBody(BoxAlive.Body);
         DyingBoxes.Add(BoxAlive);
     }
     BoxAlive = new Box(world, position, velocity, boxScale);
 }
Beispiel #2
0
        void OnLevelCompleted(Box box)
        {
            transitionTimer = new ValueAnimation(0.0f, 2000f, 2000f);

            IsLevelCompleted = true;
            CompletionBox = box;
            CompletionBox.Body.IgnoreGravity = true;
            CompletionBox.Body.LinearVelocity = Vector2.Zero;
            CompletionBox.Body.AngularVelocity = 0.0f;
            CompletionBox.Body.Rotation = 0.0f;
        }