This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool noCollision(){ | |
if (zPos< 2.8 && zPos > -2.8 && xPos < 2.8 && xPos > -2.8 && yPos < 1.44) // if z is in the room (1.44 is the room height) | |
{ | |
if (zPos < -1.8 && zPos > -2.2) //If in the space between door and stairs | |
{ | |
if (xPos < 0.1 && xPos > -0.1 && DOOROPEN) return true; //x position fits and door is open: no collision | |
else return false; | |
} | |
if (zPos <= -2.2) //if in the stairway or upstairs | |
{ |