2018-04-10 20:38:18 +02:00
|
|
|
##Coded by SergentThomasKelly
|
|
|
|
################################################################################
|
|
|
|
# INITIALISATION #
|
|
|
|
################################################################################
|
|
|
|
from pygame import math
|
|
|
|
vec = math.Vector2
|
|
|
|
WIDTH = 1280
|
|
|
|
HEIGHT = 720
|
|
|
|
TITLE = "EXODUS (PRE-BETA RELEASE -- GITHUB EDITION)"
|
|
|
|
playerAnimationLoop = 1
|
2018-04-28 17:54:05 +02:00
|
|
|
leaveRoomTrigger = bathBloodHorrorTrigger = False
|
|
|
|
L1EVENTLIST = [leaveRoomTrigger,bathBloodHorrorTrigger]
|
2018-04-22 20:43:27 +02:00
|
|
|
playerCoordinates = {"female":{"down":{1:(2,0,30,33), 2:(32,0,33,32), 3:(64,0,31,33)},
|
|
|
|
"left":{1:(4,33,27,31), 2:(36,32,25,33), 3:(68,33,24,31)},
|
|
|
|
"right":{1:(1,65,27,31), 2:(35,64,25,32), 3:(68,65,24,31)},
|
|
|
|
"up":{1:(3,97,28,31), 2:(33,96,31,32), 3:(66,97,28,31)}},
|
|
|
|
"male":{"down":{1:(4,1,26,31), 2:(35,0,27,32), 3:(68,0,26,32)},
|
|
|
|
"left":{1:(3,33,25,31), 2:(35,32,25,32), 3:(67,33,25,31)},
|
|
|
|
"right":{1:(4,65,25,31), 2:(36,64,25,32), 3:(68,65,25,31)},
|
|
|
|
"up":{1:(3,97,26,31), 2:(35,96,26,32), 3:(67,97,26,31)}}
|
|
|
|
}
|
2018-04-10 20:38:18 +02:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# PLAYER ANIMATION #
|
|
|
|
################################################################################
|
|
|
|
def playerAnimation(direction, gender):
|
2018-04-22 20:43:27 +02:00
|
|
|
global playerCoordinates, playerAnimationLoop
|
2018-04-10 20:38:18 +02:00
|
|
|
playerAnimationLoop += 2
|
|
|
|
if playerAnimationLoop >= 4:
|
|
|
|
playerAnimationLoop = 1
|
2018-04-22 20:43:27 +02:00
|
|
|
playerCoordinatesLast = playerCoordinates[gender]
|
|
|
|
if direction == 'down' or direction == 'up' or direction == 'left' or direction == 'right':
|
|
|
|
playerCoordinatesLast = playerCoordinatesLast[direction]
|
|
|
|
return playerCoordinatesLast[playerAnimationLoop]
|
|
|
|
elif direction == 'noneDown':
|
|
|
|
playerCoordinatesLast = playerCoordinatesLast["down"]
|
|
|
|
return playerCoordinatesLast[2]
|
|
|
|
elif direction == 'noneLeft':
|
|
|
|
playerCoordinatesLast = playerCoordinatesLast["left"]
|
2018-04-26 21:01:01 +02:00
|
|
|
return playerCoordinatesLast[2]
|
2018-04-22 20:43:27 +02:00
|
|
|
elif direction == 'noneRight':
|
|
|
|
playerCoordinatesLast = playerCoordinatesLast["right"]
|
|
|
|
return playerCoordinatesLast[2]
|
|
|
|
elif direction == 'noneUp':
|
|
|
|
playerCoordinatesLast = playerCoordinatesLast["up"]
|
|
|
|
return playerCoordinatesLast[2]
|
|
|
|
|
2018-04-10 20:38:18 +02:00
|
|
|
|
|
|
|
POS = (753.00,143.67)
|
|
|
|
|
|
|
|
WALLS=[(176.0,32.0,765.333,79.6667),
|
|
|
|
(178.667,33.3333,26.6667,268.0),
|
|
|
|
(50.6667,146.667,154.667,155.333),
|
|
|
|
(48.0,144.0,29.3333,1054.67),
|
|
|
|
(180.0,222.667,73.3333,79.0),
|
|
|
|
(305.333,224.0,154.833,77.0),
|
|
|
|
(337.333,34.6667,26.0,265.667),
|
|
|
|
(526.667,34.6667,33.3333,266.333),
|
|
|
|
(512.167,223.333,141.667,80.0),
|
|
|
|
(704.0,228.333,138.5,74.1667),
|
|
|
|
(724.333,34.6667,25.0,265.0),
|
|
|
|
(916.0,35.0,26.6667,1162.34),
|
|
|
|
(899.5,229.334,41.8333,73.0),
|
|
|
|
(177.333,417.333,188.0,93.3333),
|
|
|
|
(176.0,416.0,29.3333,282.333),
|
|
|
|
(178.667,592.0,317.333,80.3333),
|
|
|
|
(431.333,421.667,493.0,74.0),
|
|
|
|
(465.0,421.334,29.3333,601.0),
|
|
|
|
(470.667,641.333,313.333,109.0),
|
|
|
|
(848.0,640.0,93.3333,92.6667),
|
|
|
|
(177.333,754.667,28.0,265.667),
|
|
|
|
(182.667,833.333,598.667,76.3333),
|
|
|
|
(848.0,832.0,94.6667,78.3333),
|
|
|
|
(49.3333,1108.0,638.667,90.6667),
|
|
|
|
(785.333,1106.67,158.667,90.6667),
|
|
|
|
(362.0,450.0,78.0,61.0),
|
|
|
|
(207.0,112.0,134.0,31.0),
|
|
|
|
(305.0,103.0,33.0,56.0),
|
|
|
|
(402.0,114.0,57.0,43.0),
|
|
|
|
(361.0,201.0,85.0,50.0),
|
|
|
|
(503.0,152.0,26.0,21.0),
|
|
|
|
(594.0,114.5,54.0,42.0),
|
|
|
|
(550.0,201.5,89.0,50.0),
|
|
|
|
(692.0,152.5,26.0,21.0),
|
|
|
|
(786.0,115.5,57.0,41.0),
|
|
|
|
(745.0,202.5,89.0,50.0),
|
|
|
|
(886.0,152.5,26.0,10.0),
|
|
|
|
(258.0,771.0,88.0,24.0),
|
|
|
|
(205.0,663.0,64.0,36.0),
|
|
|
|
(369.0,665.0,104.0,40.0),
|
|
|
|
(370.0,697.0,64.0,103.0),
|
|
|
|
(484.0,790.0,43.0,48.0),
|
|
|
|
(686.0,1197.0,104.0,32.0),
|
|
|
|
(280.0,898.0,51.0,109.0),
|
|
|
|
(198.0,898.0,40.0,93.0),
|
|
|
|
(369.0,880.0,75.0,46.0),
|
|
|
|
(369.0,961.0,27.0,46.0),
|
|
|
|
(439.0,897.0,29.0,111.0),
|
|
|
|
(483.0,882.0,122.0,107.0),
|
|
|
|
(696.0,892.0,55.0,33.0),
|
|
|
|
(524.0,816.0,180.0,22.0),
|
|
|
|
(880.0,705.0,36.0,60.0),
|
|
|
|
(495.0,470.0,286.0,42.0),
|
|
|
|
(495.0,509.0,206.0,56.0),
|
|
|
|
(491.0,616.0,213.0,25.0),
|
|
|
|
(492.0,566.0,260.0,51.0),
|
|
|
|
(750.0,579.0,31.0,25.0),
|
|
|
|
(885.0,517.0,27.0,44.0),
|
|
|
|
(887.0,907.0,29.0,201.0),
|
|
|
|
(602.0,901.0,38.0,26.0),
|
|
|
|
(641.0,901.0,87.0,91.0),
|
|
|
|
(78.0,1088.0,400.0,15.0)]
|