Compare commits
13 Commits
subpixel-c
...
end-game
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4e87421bb | ||
|
|
e73eb5a765 | ||
|
|
ad4a5de10e | ||
|
|
e25a5dd9cc | ||
|
|
15e3c33c87 | ||
|
|
9dd1c7df90 | ||
|
|
df4fd1228e | ||
|
|
176d89ea14 | ||
|
|
6cd766a848 | ||
|
|
4b8eb17ba1 | ||
|
|
f2c7f19d96 | ||
|
|
8ad6236ff7 | ||
|
|
d0cf8f2a20 |
56
Throot.py
56
Throot.py
@@ -11,11 +11,9 @@ from Games.Throot.artrepository import OBSTACLES
|
||||
from Games.Throot.player import Player
|
||||
from Games.Throot.map import ObstacleSlice, OBSTACLE_SLICES
|
||||
from Games.Throot.sprites import Obstacle, update_entities
|
||||
from Games.Throot.constants import CONST_FPS
|
||||
from Games.Throot.constants import *
|
||||
|
||||
class GameManager:
|
||||
EVENT_ROOM_CHANGE = {'start': 0, 'main': 1, 'end': 2, 'next': -1}
|
||||
|
||||
def __init__(self, *rooms):
|
||||
self.rooms = rooms
|
||||
self.room_index = 0
|
||||
@@ -24,13 +22,14 @@ class GameManager:
|
||||
# Set the FPS (without this call, the default fps is 30)
|
||||
thumby.display.setFPS(CONST_FPS)
|
||||
|
||||
def room_goto(self, index):
|
||||
def room_goto(self, event):
|
||||
index = event['room']
|
||||
if index < 0:
|
||||
self.room_index = min(self.room_index + 1, len(self.rooms))
|
||||
else:
|
||||
self.room_index = index
|
||||
|
||||
self.rooms[self.room_index].start()
|
||||
self.rooms[self.room_index].start(event)
|
||||
|
||||
def restart(self):
|
||||
self.room_index = 0
|
||||
@@ -41,11 +40,11 @@ class GameManager:
|
||||
thumby.display.update()
|
||||
|
||||
if event:
|
||||
self.room_goto(self.EVENT_ROOM_CHANGE[event])
|
||||
self.room_goto(event)
|
||||
|
||||
|
||||
class Room:
|
||||
def start(self):
|
||||
def start(self, event):
|
||||
t0 = time.ticks_ms() # Get time (ms)
|
||||
thumby.display.fill(0) # Fill canvas to black
|
||||
|
||||
@@ -58,7 +57,9 @@ class RoomTitle(Room):
|
||||
super().update(tpf)
|
||||
|
||||
if thumby.inputPressed():
|
||||
return 'main'
|
||||
return {
|
||||
'room': ROOM_MAIN
|
||||
}
|
||||
|
||||
# draw title sprite
|
||||
title_text = 'press a to start'
|
||||
@@ -84,6 +85,13 @@ class GameLoop(Room):
|
||||
self.player = Player()
|
||||
|
||||
self.score = 0
|
||||
|
||||
def start(self, event):
|
||||
self.current_depth = 0
|
||||
self.entities.clear()
|
||||
self.current_obstacle_slice = OBSTACLE_SLICES[0]
|
||||
self.player = Player()
|
||||
self.score = 0
|
||||
|
||||
def get_obstacle_slice(self):
|
||||
return OBSTACLE_SLICES[randrange(0, len(OBSTACLE_SLICES))]
|
||||
@@ -109,7 +117,7 @@ class GameLoop(Room):
|
||||
self.player.update_phys(self.current_depth, prev_depth)
|
||||
|
||||
# Generate new entities as needed
|
||||
self.entities |= update_entities(self.current_obstacle_slice, self.current_depth, prev_depth)
|
||||
self.entities |= update_entities(self.entities, 5, self.current_depth, prev_depth)
|
||||
|
||||
# Updates the entities
|
||||
to_remove = set()
|
||||
@@ -118,7 +126,10 @@ class GameLoop(Room):
|
||||
to_remove.add(entity)
|
||||
elif entity.intersects_pixel(self.player.xsub, self.player.ysub):
|
||||
if isinstance(entity, Obstacle):
|
||||
print("Hit!")
|
||||
return {
|
||||
'room': ROOM_END,
|
||||
'score': self.score
|
||||
}
|
||||
self.entities -= to_remove
|
||||
|
||||
self.score = int(self.current_depth * 10)
|
||||
@@ -127,13 +138,32 @@ class GameLoop(Room):
|
||||
# Draw the entities
|
||||
for entity in self.entities:
|
||||
entity.render(tpf, self.current_depth, prev_depth)
|
||||
self.player.update_draw(self.current_depth, prev_depth)
|
||||
self.player.update_draw(self.player.y)
|
||||
|
||||
thumby.display.drawText(str(self.score), thumby.display.width - (len(str(self.score)) + 2) * 5, 1, 1)
|
||||
thumby.display.update()
|
||||
|
||||
class EndRoom(Room):
|
||||
def __init__(self):
|
||||
self.score = 0
|
||||
|
||||
def start(self, event):
|
||||
self.score = event['score']
|
||||
# Used to make sure that we aren't triggering from input mean't for the game.
|
||||
self.still_pressed = thumby.inputPressed()
|
||||
|
||||
def update(self, tpf):
|
||||
if not thumby.inputPressed():
|
||||
self.still_pressed = False
|
||||
elif not self.still_pressed and thumby.inputPressed():
|
||||
return {
|
||||
'room': ROOM_START
|
||||
}
|
||||
thumby.display.fill(0)
|
||||
thumby.display.drawText("Final Score:", (thumby.display.width - 60) // 2, 1, 1)
|
||||
thumby.display.drawText(str(self.score), (thumby.display.width - (len(str(self.score)) * 5)) // 2, 9, 1)
|
||||
|
||||
def main():
|
||||
game = GameManager(RoomTitle(), GameLoop())
|
||||
game = GameManager(RoomTitle(), GameLoop(), EndRoom())
|
||||
game.start()
|
||||
|
||||
prev_time = 0
|
||||
|
||||
BIN
ThrootTitle.raw
Normal file
BIN
ThrootTitle.raw
Normal file
Binary file not shown.
@@ -122,13 +122,57 @@ bigdoritoobstacle = SpriteImage(
|
||||
)
|
||||
# BITMAP: width: 16, height: 16
|
||||
leaf = SpriteImage(
|
||||
bytearray([128,1,1,1,3,3,3,71,135,15,15,31,63,255,255,255,255,254,252,248,240,240,224,224,192,193,194,196,200,144,1,63]),
|
||||
bytearray([127,254,254,254,252,252,252,184,120,240,240,224,192,0,0,0,
|
||||
0,1,3,7,15,15,31,31,63,62,61,59,55,111,254,192]),
|
||||
None,
|
||||
16,
|
||||
16
|
||||
)
|
||||
|
||||
UNDERGROUND_OBSTACLES = [skull, pizza, boulder, ball, steve, mathroot, robot, dinoskull, dinojaw, dinospine, bone, bigdinohead, bigboneddiag, bigdoritoobstacle]
|
||||
OVERGROUND_OBSTACLES = [spaceinv, leaf]
|
||||
annoydead = SpriteImage(
|
||||
bytearray([0,240,214,236,54,190,214,238,212,254,248,240,224,192,192,128,128,128,128,240,0,
|
||||
0,63,255,254,126,126,254,255,127,127,127,127,127,255,255,127,127,255,255,31,0,
|
||||
0,0,1,0,0,0,3,1,0,0,0,0,0,3,1,0,0,1,0,0,0]),
|
||||
None,
|
||||
21,
|
||||
19
|
||||
)
|
||||
|
||||
OBSTACLES = UNDERGROUND_OBSTACLES + OVERGROUND_OBSTACLES
|
||||
flowerpetals = SpriteImage(
|
||||
bytearray([0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,252,254,254,254,254,252,248,
|
||||
0,0,0,0,0,252,254,255,255,255,255,255,254,254,223,63,255,255,255,255,255,255,
|
||||
0,224,248,252,252,252,255,255,255,247,239,239,223,255,255,255,255,255,251,255,255,255]),
|
||||
None,
|
||||
22,
|
||||
24
|
||||
)
|
||||
|
||||
flowerpetalanim = SpriteImage(
|
||||
bytearray([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,191,191,7,55,231,227,251,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127,127,191,191,191,7,115,249,253,252,254,252,255,255,255,255,255,31,79,239,231,224,238,223,223,223,191,255,254,248,243,255,255,255,255,255,255,255,255,255,127,127,127,127,127,127,127,7,241,252,254,254,254,254,253,249,255,255,255,255,1,252,254,255,255,255,255,255,254,254,223,63,255,255,255,255,255,255,15,227,249,253,253,252,255,255,255,247,239,239,223,255,255,255,255,255,251,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,207,247,243,251,243,247,199,255,255,255,255,255,15,231,243,249,253,253,253,253,252,254,247,231,207,255,255,255,255,255,31,199,243,251,250,248,255,255,239,223,191,255,255,255,255,255,255,255,255,255,255]),
|
||||
None,
|
||||
22,
|
||||
24
|
||||
)
|
||||
|
||||
lvl4wall = SpriteImage(
|
||||
bytearray([255,255,254,254,252,252,248,248,240,240,224,224,192,192,192,128,128,0,0,0,0,224,240,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,240,224,0,0,0,224,240,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127,127,63,0,0,0,0,63,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127,127,31,0,0,0,63,127,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,63,31,31,15,15,7,7,3,3,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),
|
||||
None,
|
||||
72,
|
||||
30
|
||||
)
|
||||
|
||||
ballobstaclelvl3 = SpriteImage(
|
||||
bytearray([0,0,0,0,0,0,0,0,192,224,240,240,248,252,252,252,254,254,254,254,254,254,252,252,252,248,240,240,224,192,0,0,0,0,0,0,0,0,0,0,192,224,240,240,248,252,252,252,254,254,254,254,254,254,252,252,252,248,240,240,224,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,240,0,0,0,0,240,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,240,0,0,0,0,0,0,0,0,0,0,0,0,3,31,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,31,3,0,0,0,0,3,31,63,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,31,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,7,15,15,15,31,31,31,31,31,31,15,15,15,7,3,3,1,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,7,15,15,15,31,31,31,31,31,31,15,15,15,7,3,3,1,0,0,0,0,0,0,0,0,0,0,0]),
|
||||
None,
|
||||
72,
|
||||
30
|
||||
)
|
||||
|
||||
Doritoobstaclelvl5 = SpriteImage(
|
||||
bytearray([254,254,254,254,254,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,248,248,248,248,248,248,248,248,248,248,248,248,248,240,224,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,192,192,224,224,240,248,248,252,252,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127,63,31,31,15,7,3,3,3,3,1,0,0,0,0,0,0,128,128,192,224,224,240,240,248,252,252,254,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127,127,63,63,31,31,31,15,15,7,7,7,3,3,1,1,1,0,0,0,0,0,0,0,0,128,128,192,224,240,248,248,252,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,3,3,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]),
|
||||
None,
|
||||
72,
|
||||
30
|
||||
)
|
||||
|
||||
OBSTACLES = [skull, pizza, boulder, ball, steve, mathroot, leaf, robot, dinoskull, dinojaw, dinospine, bone, bigdinohead, bigboneddiag, bigdoritoobstacle, spaceinv,annoydead,lvl4wall,ballobstaclelvl3,Doritoobstaclelvl5]
|
||||
|
||||
1
flowerpetal.raw
Normal file
1
flowerpetal.raw
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?؟؟7هك<D987><D983><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>؟؟؟s<><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Oُهـَ<D980><D98E><EFBFBD>؟<EFBFBD><D89F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ّ<><D991><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ك<><D983><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ُُ<D98F><D98F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>د<><D8AF><EFBFBD><EFBFBD><EFBFBD>ا<EFBFBD><D8A7><EFBFBD><EFBFBD><EFBFBD>ه<><D987><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>هد<D987><D8AF><EFBFBD><EFBFBD><EFBFBD>ا<><D8A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ُ<EFBFBD>؟<EFBFBD><D89F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
24
player.py
24
player.py
@@ -65,17 +65,17 @@ class Player:
|
||||
self.y = int(self.ysub)
|
||||
|
||||
# animation
|
||||
self.anim.update_phys(self.x, self.y, CONST_PL_SCREEN_Y)
|
||||
self.anim.update_phys(self.x, self.y, CONST_PL_SCREEN_Y, current_depth)
|
||||
|
||||
def update_draw(self, current_depth, prev_depth):
|
||||
def update_draw(self, plworldy):
|
||||
# debug draw
|
||||
if self.debugvisible:
|
||||
pix_x = self.x
|
||||
pix_y = int(current_depth - self.y)
|
||||
pix_y = int(self.y - plworldy + 20)
|
||||
thumby.display.setPixel(pix_x, pix_y, self.isdecend)
|
||||
|
||||
# animation
|
||||
self.anim.update_draw(current_depth, prev_depth, self.isdecend)
|
||||
self.anim.update_draw(plworldy - 20, self.isdecend)
|
||||
|
||||
|
||||
class Camera:
|
||||
@@ -101,7 +101,9 @@ class PlayerAnimation:
|
||||
self.debugrandomrange = self.RANDOM_RANGE
|
||||
self.debugposrange = self.POS_RANGE
|
||||
|
||||
def update_phys(self, plworldx, plworldy, plscreeny):
|
||||
def update_phys(self, plworldx, plworldy, plscreeny, current_depth):
|
||||
|
||||
#print(plworldx, plworldy, plscreeny, current_depth)
|
||||
|
||||
### exit if player y pos less than random range
|
||||
# # debug change random range
|
||||
@@ -157,19 +159,21 @@ class PlayerAnimation:
|
||||
# self.poslist.append((plworldx, plworldy))
|
||||
|
||||
### remove the fist item in the list if its full line is off screen
|
||||
#if self.poslist[1][self.POS_Y] < plworldy - plscreeny:
|
||||
# self.poslist.pop(0)
|
||||
if self.poslist[1][self.POS_Y] < plworldy - plscreeny:
|
||||
self.poslist.pop(0)
|
||||
|
||||
#print(len(self.poslist))
|
||||
|
||||
def update_draw(self, current_depth, prev_depth, isdecend=1):
|
||||
def update_draw(self, topleft, prev_depth, isdecend=1):
|
||||
### draw line from first position to next
|
||||
|
||||
#print(topleft)
|
||||
|
||||
for i in range(len(self.poslist) - 1):
|
||||
thumby.display.drawLine(
|
||||
int(self.poslist[i][self.POS_X]),
|
||||
int(current_depth - self.poslist[i][self.POS_Y]),
|
||||
int(self.poslist[i][self.POS_Y] - topleft),
|
||||
int(self.poslist[i + 1][self.POS_X]),
|
||||
int(current_depth - self.poslist[i + 1][self.POS_Y]),
|
||||
int(self.poslist[i + 1][self.POS_Y] - topleft),
|
||||
isdecend
|
||||
)
|
||||
|
||||
41
sprites.py
41
sprites.py
@@ -1,4 +1,5 @@
|
||||
from random import randint
|
||||
import math
|
||||
from random import randrange, random
|
||||
|
||||
import thumby
|
||||
|
||||
@@ -101,7 +102,7 @@ class Obstacle(Entity):
|
||||
return self.can_render(current_depth)
|
||||
|
||||
|
||||
def update_entities(current_slice: ObstacleSlice, current_depth: int, prev_depth: int):
|
||||
def update_entities(entities, difficulty: int, current_depth: int, prev_depth: int):
|
||||
"""
|
||||
Checks the current game state and generates new sprites based on said state.
|
||||
|
||||
@@ -118,24 +119,28 @@ def update_entities(current_slice: ObstacleSlice, current_depth: int, prev_depth
|
||||
:return:
|
||||
A list of entities to generate this tick.
|
||||
"""
|
||||
|
||||
OBSTACLE_BUFFER = 10
|
||||
|
||||
if current_depth == prev_depth:
|
||||
# If we haven't moved, we don't need to spawn anything
|
||||
return set()
|
||||
# Local y relative to the top of the slice
|
||||
slice_y = (current_depth) % ObstacleSlice.height
|
||||
slice_prev_y = (prev_depth) % ObstacleSlice.height
|
||||
if prev_depth < current_depth and slice_prev_y > slice_y:
|
||||
slice_prev_y -= ObstacleSlice.height
|
||||
elif current_depth < prev_depth and slice_y > slice_prev_y:
|
||||
slice_prev_y += ObstacleSlice.height
|
||||
min_y = min(slice_prev_y, slice_y)
|
||||
max_y = max(slice_prev_y, slice_y)
|
||||
|
||||
spawned = set()
|
||||
for entity in current_slice.obstacle_map:
|
||||
# The position the entity should spawn at, relative to the slice top
|
||||
entity_y = entity[1]
|
||||
if entity_y >= min_y and entity_y < max_y:
|
||||
sprite_image = OBSTACLES[entity[2]]
|
||||
sprite = thumby.Sprite(sprite_image.width, sprite_image.height, sprite_image.image, 0, 0, 0, entity[3], entity[4])
|
||||
spawned.add(Obstacle(entity[0], entity_y + current_depth // ObstacleSlice.height * ObstacleSlice.height, sprite_image.width, sprite_image.height, sprite_image.collision or sprite_image.image, sprite))
|
||||
max_spawned = 1#randrange(0, difficulty + 1)
|
||||
while len(spawned) < max_spawned and random() < (2 * math.pow(difficulty + 0.01, 2)) / (3 * math.pow(difficulty + 0.01, 2) + 20 * (difficulty + 0.01)) + 0.05:
|
||||
sprite_image = OBSTACLES[randrange(0, min((difficulty + 1) * 3, len(OBSTACLES)))]
|
||||
if sprite_image.width >= thumby.display.width:
|
||||
x = 0
|
||||
else:
|
||||
x = randrange(0, thumby.display.width - sprite_image.width)
|
||||
y = current_depth
|
||||
error = False
|
||||
for entity in entities | spawned:
|
||||
if x > (entity.x - OBSTACLE_BUFFER) and x <= (entity.x + entity.width + OBSTACLE_BUFFER) and y > (entity.y - OBSTACLE_BUFFER) and y <= (entity.y + entity.height + OBSTACLE_BUFFER):
|
||||
error = True
|
||||
break
|
||||
if not error:
|
||||
sprite = thumby.Sprite(sprite_image.width, sprite_image.height, sprite_image.image, 0, 0, 0, False, False)
|
||||
spawned.add(Obstacle(x, y, sprite_image.width, sprite_image.height, sprite_image.collision or sprite_image.image, sprite))
|
||||
return spawned
|
||||
|
||||
Reference in New Issue
Block a user