示例#1
0
文件: BoxArea.cs 项目: pakona/Boxics
 public void RecreateBoxAt(Vector2 position, Vector2 velocity)
 {
     if (BoxAlive != null)
     {
         world.RemoveBody(BoxAlive.Body);
         DyingBoxes.Add(BoxAlive);
     }
     BoxAlive = new Box(world, position, velocity, boxScale);
 }
示例#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;
        }