Esempio n. 1
0
 private void CheckForExits()
 {
     if (roofRay.IsColliding())
     {
         //Set the open flag on the wall making contact with the previous room
         roofOpen = true;
         //Delete the wall to open it up to the adjacent rooms exit
         roofWall.QueueFree();
     }
     if (floorRay.IsColliding())
     {
         //Set the open flag on the wall making contact with the previous room
         floorOpen = true;
         //Delete the wall to open it up to the adjacent rooms exit
         floorWall.QueueFree();
     }
     if (frontRay.IsColliding())
     {
         //Set the open flag on the wall making contact with the previous room
         frontOpen = true;
         //Delete the wall to open it up to the adjacent rooms exit
         frontWall.QueueFree();
     }
     if (backRay.IsColliding())
     {
         //Set the open flag on the wall making contact with the previous room
         backOpen = true;
         //Delete the wall to open it up to the adjacent rooms exit
         backWall.QueueFree();
     }
     if (leftRay.IsColliding())
     {
         //Set the open flag on the wall making contact with the previous room
         leftOpen = true;
         //Delete the wall to open it up to the adjacent rooms exit
         leftWall.QueueFree();
     }
     if (rightRay.IsColliding())
     {
         //Set the open flag on the wall making contact with the previous room
         rightOpen = true;
         //Delete the wall to open it up to the adjacent rooms exit
         rightWall.QueueFree();
     }
 }