SHARE
TWEET

Untitled

a guest Nov 17th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func drawCorridorH(Room1, Room2):
  2.     # CENTRO DEI MURI PER IL CORRIDOIO
  3.     var rightWallRoom1 = [int(Room1[0]), int(Room1[1] + (Room1[2].size() / 2))]
  4.     var leftWallRoom2 = [int(Room2[0] - (Room2[2].size())), int(Room2[1] + (Room2[3].size() / 2))]
  5.     var distanceRTR = leftWallRoom2[0] - rightWallRoom1[0]
  6.     var wall = generateWallHSized(distanceRTR)
  7.     var doorStart = [rightWallRoom1[0], rightWallRoom1[1]]
  8.     var doorEnd = [leftWallRoom2[0], leftWallRoom2[1]]
  9.    
  10.     for i in range(distanceRTR):
  11.         self.set_cell(rightWallRoom1[0] + i + 1, rightWallRoom1[1] - 1, wall[i])
  12.         self.set_cell(rightWallRoom1[0] + i + 1, rightWallRoom1[1] + 1, wall[i])
  13.     return [doorStart, doorEnd]
  14.  
  15.  
  16.  
  17.  
  18.  
  19. func placeDoorH(corridor):
  20.     var start = corridor[1]
  21.     var end = corridor[0]
  22.     print("startPoint:" + str(start))
  23.     set_cell(start[0], start[1], tile_set.find_tile_by_name("doorH"))
  24.     print("endPoint:" + str(end))
  25.     set_cell(end[0], end[1], tile_set.find_tile_by_name("doorH"))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top