Делаю физический движок
This commit is contained in:
@@ -6,6 +6,7 @@ from random import randint
|
||||
class Map():
|
||||
ground_tiles = arcade.SpriteList()
|
||||
object_tiles = arcade.SpriteList()
|
||||
block_list = arcade.SpriteList()
|
||||
def __init__(self,width,height,tw,th):
|
||||
self.height = height
|
||||
self.width = width
|
||||
@@ -27,9 +28,9 @@ class Map():
|
||||
' e e ',
|
||||
' s ',
|
||||
' ',
|
||||
' p ',
|
||||
' s p ',
|
||||
' ',
|
||||
' e ',
|
||||
' e s ',
|
||||
' ',
|
||||
' s e ',
|
||||
]
|
||||
@@ -59,10 +60,11 @@ class Map():
|
||||
self.height - (self.tileh//2 + i * self.tileh),
|
||||
'player')
|
||||
elif self.objects[i][j] == 'e':
|
||||
Tank(
|
||||
tank = Tank(
|
||||
self.tilew//2 + j * self.tilew,
|
||||
self.height - (self.tileh//2 + i * self.tileh)
|
||||
)
|
||||
Map.block_list.append(tank.get_sprite())
|
||||
elif self.objects[i][j] == 's':
|
||||
Bonus(
|
||||
self.tilew//2 + j * self.tilew,
|
||||
|
||||
Reference in New Issue
Block a user