initial commit

This commit is contained in:
MitchWeaver
2016-07-26 18:37:18 -05:00
parent 084779ae15
commit a1bfbee043
247 changed files with 5756 additions and 0 deletions
Regular → Executable
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,43 @@
# mob will travel around a given rectangle -- think like in early stages of metroid
# territory === given rectangle
def mob_travel_around_rectangle_ai(mob, territory, speed, clockWise):
fullBounds = mob.getFullBounds()
rightBounds = mob.getRightBounds()
leftBounds = mob.getLeftBounds()
topBounds = mob.getTopBounds()
bottomBounds = mob.getBottomBounds()
top = territory.getTop()
right = territory.getRight()
left = territory.getLeft()
bottom = territory.getBottom()
if clockWise:
if fullBounds.intersects(right) and not fullBounds.intersects(bottom):
mob.setVelocity(0, speed)
mob.setX(territory.pos.x + territory.getWidth())
mob.setY(restrict(mob.getY(), territory.getY() - 2))
elif fullBounds.intersects(top):
mob.setVelocity(speed, 0)
mob.setY(territory.pos.y - mob.getHeight())
mob.setX(restrict(mob.getX(), territory.getX() - 1))
elif fullBounds.intersects(left) and not fullBounds.intersects(top) and not topBounds.intersects(bottom):
mob.setVelocity(0, -speed)
mob.setX(territory.pos.x - mob.getHeight())
elif fullBounds.intersects(bottom):
mob.setVelocity(-speed, 0)
mob.setY(territory.pos.y + 2 + mob.getHeight())
else:
if fullBounds.intersects(right) and not fullBounds.intersects(top):
mob.setVelocity(0, -speed)
mob.setX(territory.pos.x + territory.getWidth())
mob.setY(restrict(mob.getY(), territory.getY() - 2))
elif fullBounds.intersects(top) and not fullBounds.intersects(left):
mob.setVelocity(-speed, 0)
mob.setY(territory.pos.y - mob.getHeight())
elif fullBounds.intersects(bottom) and not fullBounds.intersects(right):
mob.setVelocity(speed, 0)
mob.setY(territory.pos.y + mob.getHeight() + 2)
elif fullBounds.intersects(left):
mob.setVelocity(0, speed)
mob.setX(territory.pos.x - mob.getHeight())
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More