本文整理匯總了Python中pygame.sprite.Group.empty方法的典型用法代碼示例。如果您正苦於以下問題:Python Group.empty方法的具體用法?Python Group.empty怎麽用?Python Group.empty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pygame.sprite.Group
的用法示例。
在下文中一共展示了Group.empty方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test
# 需要導入模塊: from pygame.sprite import Group [as 別名]
# 或者: from pygame.sprite.Group import empty [as 別名]
def test(sett, screen):
pepe = pygame.image.load('pepe.png')
borrito = pygame.image.load('borrito.png')
test_dia = Dialogue(sett, screen, "right", "", pepe)
test_dia2 = Dialogue(sett,screen, "left", "", borrito)
dials = Group()
dials.add(test_dia)
dials.add(test_dia2)
backwards = False
while True:
gf.events()
if not sett.paused:
test_dia.update(backwards)
test_dia2.update(backwards)
print(test_dia2.x)
if test_dia.x == 100:
##test dialogue. TODO have file of encounters to refer to
gf.update_screen(sett, screen, True, dials,"i am here to slay",173,255,47)
pygame.time.wait(3000)
gf.update_screen(sett, screen, True, dials,"prepare urself",173,255,47)
pygame.time.wait(3000)
gf.update_screen(sett, screen, True, dials,"no way",255,69,0)
pygame.time.wait(3000)
backwards = True
#test_dia.x = test_dia.x -1 #back()
#test_dia2.x= test_dia2.x +1 #back()
if test_dia.x < -200:
del test_dia
if test_dia2.x > 800:
del test_dia2
dials.empty()
gf.update_screen(sett, screen, True, dials)
示例2: Main
# 需要導入模塊: from pygame.sprite import Group [as 別名]
# 或者: from pygame.sprite.Group import empty [as 別名]
class Main(object):
"""
creates and recieves input from the GUI
"""
SCREEN_SIZE = 800,600
FPS = 30
def __init__(self):
"""
no gui stuff yet, finishing the core components
"""
self.ROOT_DIR = os.path.dirname(sys.argv[0])
self.IMG_DIR = os.path.join(self.ROOT_DIR, "images")
self.DATA_DIR = os.path.join(self.ROOT_DIR, "database")
self.dbm = DataBaseManager(self.DATA_DIR)
pygame.init()
pygame.font.init()
self.MAIN_SCREEN = pygame.display.set_mode(self.SCREEN_SIZE)
self.MAIN_SCREEN_RECT = self.MAIN_SCREEN.get_rect()
self.openingImage,self.openingImageRect = loadImage(self.IMG_DIR, "GrocerySpy.jpg")
self.MAIN_SCREEN.blit(self.openingImage,
(self.MAIN_SCREEN_RECT.centerx - self.openingImageRect.width /2,
self.MAIN_SCREEN_RECT.centery - self.openingImageRect.height /2))
## make button here
startButton = Button(self.IMG_DIR, "textButton", (300,475), "menu", -1)
startButton.addText("Start Here")
# add that button to the list
self.buttonGroup = Group(startButton)
self.windowGroup = Group()
self.state = "prestart"
self.stateChanged = False
# set key repeats for scrolling windows
pygame.key.set_repeat(20, 20)
self.groceryList = GroceryList()
# variable for storing the state of the browseAll window if it is left
self.toggledRecipeNames = []
self.controlHeld = False
self.pasteDelayReset = 1000
self.pasteDelay = self.pasteDelayReset
def run(self):
done = False
while not done:
## input loop
for event in pygame.event.get():
if event.type == QUIT:
done = True
elif event.type == KEYDOWN and event.key == K_ESCAPE:
done = True
## right click anything to have a pop up window
# appear at the cursor with more information about the thing
elif event.type == MOUSEBUTTONDOWN and event.button == 1:
self.handleLeftMouseClick(pygame.mouse.get_pos())
## arrow keys
elif event.type == KEYDOWN and event.key == K_DOWN:
self.attemptScroll(-3)
elif event.type == KEYDOWN and event.key == K_UP:
self.attemptScroll(3)
elif event.type == KEYDOWN and (event.key == K_RCTRL or event.key == K_LCTRL):
self.controlHeld = True
elif event.type == KEYUP and (event.key == K_RCTRL or event.key == K_LCTRL):
self.controlHeld = False
elif event.type == KEYDOWN and event.key == K_v:
if self.controlHeld:
if self.pasteDelay < 10:
self.doPaste()
self.pasteDelay = self.pasteDelayReset
## end input
if self.pasteDelay > 0:
self.pasteDelay -= 1
## change screen
if self.stateChanged:
## clear everything on the screen first
self.buttonGroup.empty()
self.windowGroup.empty()
self.MAIN_SCREEN.fill((0,0,0))
self.stateChanged = False
if self.state == "menu":
self.createMenu()
elif self.state == "browseAll":
self.setUpViewAll()
#.........這裏部分代碼省略.........
示例3: SpaceGame
# 需要導入模塊: from pygame.sprite import Group [as 別名]
# 或者: from pygame.sprite.Group import empty [as 別名]
class SpaceGame(Microgame):
def __init__(self):
Microgame.__init__(self)
# TODO: Initialization code here
self.count = 0
self.spaceship = Spaceship()
self.bg = Background()
self.planet = Planet()
self.monster = Group(Monster())
self.earth = Group(EarthExp())
self.background = Group(self.bg)
self.sprites = Group(self.planet, self.spaceship)
self.is_win = False
self.is_lose = False
def generate_asteroid(self):
if self.count == 10:
if randint(0,1) == 0:
self.sprites.add(Asteroid(-10, randint(0, locals.HEIGHT - 400), 1))
else:
self.sprites.add(Asteroid(locals.WIDTH + 10, randint(0, locals.HEIGHT - 400), -1))
self.count = 0
else:
self.count += 1
def start(self):
# TODO: Startup code here
music.load(join("games","space","music","space_song.ogg"))
music.play()
def stop(self):
# TODO: Clean-up code here
music.stop()
def update(self, events):
# TODO: Update code here
self.background.update()
self.sprites.update()
#Make asteroids
self.generate_asteroid()
#Check if spaceship hits sides of screen
x_ship_left, _ = self.spaceship.rect.bottomleft
x_ship_right, _ = self.spaceship.rect.bottomright
if x_ship_left <= 0:
self.spaceship.x_velocity = 0
elif x_ship_right >= locals.WIDTH - 14:
self.spaceship.x_velocity = 0
#Check if spaceship hits top/bottom of screen sectioned to movement
_, y_ship_top = self.spaceship.rect.topleft
_, y_ship_bottom = self.spaceship.rect.bottomleft
if y_ship_top <= locals.HEIGHT - 300:
self.spaceship.y_velocity = 0
elif y_ship_bottom >= locals.HEIGHT - 20:
self.spaceship.y_velocity = 0
#Process user input
for event in events:
if event.type == KEYDOWN and event.key == K_LEFT:
if x_ship_left > 0:
self.spaceship.x_velocity -= VELOCITY_INC
elif event.type == KEYUP and event.key == K_LEFT:
self.spaceship.x_velocity = 0
elif event.type == KEYDOWN and event.key == K_RIGHT:
if x_ship_right < locals.WIDTH - 14:
self.spaceship.x_velocity += VELOCITY_INC
elif event.type == KEYUP and event.key == K_RIGHT:
self.spaceship.x_velocity = 0
elif event.type == KEYDOWN and event.key == K_UP:
if y_ship_top > locals.HEIGHT - 300:
self.spaceship.y_velocity -= VELOCITY_INC
elif event.type == KEYUP and event.key == K_UP:
self.spaceship.y_velocity = 0
elif event.type == KEYDOWN and event.key == K_DOWN:
if y_ship_bottom < locals.HEIGHT - 20:
self.spaceship.y_velocity += VELOCITY_INC
elif event.type == KEYUP and event.key == K_DOWN:
self.spaceship.y_velocity = 0
#music.load(join("games","space","music","Powerup7.wav"))
#music.play()
#Make win when spaceship hits planet
if self.planet.rect.colliderect(self.spaceship.rect):
sound_planet = pygame.mixer.Sound(join("games","space","music","Powerup.wav"))
sound_planet.play()
self.is_win = True
for each in self.sprites.sprites():
if isinstance(each, Asteroid):
if each.rect.colliderect(self.spaceship.rect):
sound_asteroid = pygame.mixer.Sound(join("games","space","music","Explosion.wav"))
sound_asteroid.play()
self.is_lose = True
#Creates win scree
if self.is_win:
self.sprites.empty()
self.background.empty()
#.........這裏部分代碼省略.........
示例4: Game
# 需要導入模塊: from pygame.sprite import Group [as 別名]
# 或者: from pygame.sprite.Group import empty [as 別名]
class Game():
def __init__(self):
#setup
pygame.init()
pygame.font.init()
self.font = pygame.font.Font(None,24)
self.fontColor = (0,0,0)
pygame.mixer.init()
pygame.display.set_mode(SCREEN)
pygame.display.set_caption('#ElJuegoDeLasJoincic')
self.screen = pygame.display.get_surface()
self._quit=False
self.clock = pygame.time.Clock()
self.controller= Controller()
self.background = load_image("background.png")
self.menu_background = load_image("menu_background.png")
self.menu_iniciar = load_image("menu_iniciar.png")
self.menu_salir = load_image("menu_salir.png")
self.gameover = load_image("gameover.png")
self.cursor = load_image("cursor.png")
self.arrow = load_image("arrow.png")
self.player = Player()
self.group = Group()
self.protocolo = Protocolo()
self.group.add(self.player)
self.groupOyentes = Group()
self.groupTakitos = Group()
self.groupHUD = Group()
self.state= GAME_INIT
def pause(self):
pass
def wait(self):
pass
def hayPuesto(self):
for row in self.oyentes:
for val in row:
if val == 0:
return True
return False
def init(self):
self.screen.blit(self.menu_background,(0,0))
rect = self.screen.blit(self.menu_iniciar,(200,200))
if rect.collidepoint(self.controller.mouse.position):
self.screen.blit(self.menu_iniciar,(200,200))
if self.controller.mouse.click:
self.state = GAME_LOOP
self.oyentes=[
[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],
]
self.level=1
self.initLevel();
rect = self.screen.blit(self.menu_salir,(200,260))
if rect.collidepoint(self.controller.mouse.position):
self.screen.blit(self.menu_salir,(200,260))
if self.controller.mouse.click:
sys.exit(0)
def initLevel(self):
count= (self.level - 1 )*2 + 4
self.oyentes=[
[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],
]
self.groupOyentes.empty()
self.groupTakitos.empty()
for i in range(count):
if self.hayPuesto():
oyente=Oyente()
self.groupOyentes.add(oyente)
oyente.onScoreTick = self.comprobarScore
while True:
i = randrange(5)
j = randrange(5)
if self.oyentes[i][j]== 0:
oyente.rect.x=160+(i*oyente.rect.w)
oyente.rect.y=j*oyente.rect.h
break
self.time_next_level=time.time()+ 60
self.puntos=0
def comprobarScore(self, oyente):
if oyente.state == OYENTE_DESPIERTO or \
oyente.state == OYENTE_DISTRAIDO or \
#.........這裏部分代碼省略.........
示例5: encode
# 需要導入模塊: from pygame.sprite import Group [as 別名]
# 或者: from pygame.sprite.Group import empty [as 別名]
message_group.add(pl) # добавляем объект в группу сообщения
message_list.append(pl) # добавляем объект в список сообщения, который нужен для передачи в шифрующую функцию
messx += PL_W
# обновляем все объекты группы сообщения (вызываем метод update)
for i in message_group:
i.update()
for i in button_group: # перебираем объекты группы кнопок управления
i.update() # вызывем для каждого объекта метод update
if i.onClick(mouse_click): # проверяем было ли нажатие по данной кнопке
if i.text == 'Зашифровать': # если было нажатие и текст кнопки = Зашифровать
message_list = encode() # то вызываем функцию шифрования
if i.text == 'Стереть': # если текст кнопки = Стереть
# очищаем все группы кроме групп алфавита и кнопок управления
message_group.empty()
messx = 150 # задаем начальное положение отображения сообщения
encode_message_group.empty()
message_list = [] # обнуляем список объектов для дешифрования
decode_message.empty()
if i.text == 'Дешифровать': # если текст кнопки = Дешифровать
decode(message_list) # вызываем функцию дешифрования
if i.text == 'Показать коды': # если текст = Показать коды
i.text = i.alt_text # меняем текст данной кнопки на альтернативный
show_codes([message_group, encode_message_group, decode_message]) # вызываем функцию show_codes передавая ей все группы кнопок коды которых нужно показать
elif i.text == 'Показать текст': # если текст кнопки = Показать текст
i.text = 'Показать коды' # меняем основной текст на Показать коды
show_text([message_group, encode_message_group, decode_message]) # вызываем функцию show_text и передаем ей все группы кнопок текст которых нужно отобразить
# обновляем все объекты группы зашифрованного сообщения (вызываем метод update)
for i in encode_message_group:
示例6: Game
# 需要導入模塊: from pygame.sprite import Group [as 別名]
# 或者: from pygame.sprite.Group import empty [as 別名]
class Game(Application.State):
fps = 60
CHEAT = [ K_UP, K_UP, K_DOWN, K_DOWN, K_LEFT, K_RIGHT, K_LEFT, K_RIGHT, K_b, K_a ]
def setup(self):
scr_size = self.app.screen.get_size()
self.level = Level(scr_size)
self.level.restart()
self.cheat_idx = 0
self.background = TiledImage(load_image("grass"))
# makes things look a bit nicer for some reason
w = self.background.rect.width
self.background.rect.move_ip(-w/2, -w/2)
self.l_shadow = ShadowLayer(scr_size)
self.l_sprite = Layer(scr_size)
self.sprites = Group()
self.app.scores.reset()
self.font = pygame.font.Font(None, 60)
self.cheating = False
play_song("maintheme", volume=0.7)
def resume(self):
self.clock = pygame.time.Clock()
pygame.mixer.music.unpause()
def pause(self):
pygame.mixer.music.pause()
def handle_event(self, event):
if event.type == KEYDOWN and event.key == K_ESCAPE:
self.level.player.cheating = False
self.app.set_state(PauseMenu)
elif event.type == KEYDOWN and event.key == self.CHEAT[self.cheat_idx]:
self.cheat_idx += 1
elif event.type == KEYDOWN:
self.cheat_idx = 0
if self.cheat_idx == len(self.CHEAT):
self.cheat_idx = 0
self.level.player.cheating = not self.level.player.cheating
def update(self):
dt = self.clock.tick(self.fps)
self.level.update(dt)
if self.level.player.cheating:
self.cheating = True
elif not self.level.player.cheating and len(self.level.coins) == 1:
self.cheating = False
if not self.cheating:
self.app.scores.update( len(self.level.coins) )
else:
self.app.scores.update(-1)
def draw(self, screen):
self.l_shadow.clear()
self.l_sprite.clear()
# switch to layers
screen.fill((80,80,80))
self.background.draw(screen)
# create a list of sprites we need to draw
self.sprites.empty()
self.sprites.add(self.level.player)
for coin in self.level.coins:
if coin.visible:
self.sprites.add(coin)
# sort the sprites by their height
sprites = sorted(self.sprites, sortby_y_h)
self.l_shadow.draw_sprites(sprites)
self.l_sprite.draw_sprites(sprites)
self.l_shadow.draw(screen)
self.l_sprite.draw(screen)
# draw score
score = self.font.render("Coins: %d" % self.app.scores.score, True, (255,255,255))
rect = score.get_rect()
rect.bottomleft = screen.get_rect().bottomleft
screen.blit(score, rect)
hiscore = self.font.render("Hiscore: %d" % self.app.scores.hiscore, True, (255,255,255))
#.........這裏部分代碼省略.........
示例7: Level
# 需要導入模塊: from pygame.sprite import Group [as 別名]
# 或者: from pygame.sprite.Group import empty [as 別名]
#.........這裏部分代碼省略.........
cannon.start_transition(Cannon.DEACTIVATED)
self.manager.give_energy(opt.energy_from_cannon)
#cannon with cell
#kill one cell and reverse cannon direction
#assuming this is only possible if cannon in firing state
if cannon.get_state_number() == Cannon.FIRING:
cannon_collides = spritecollide(cannon, shield, False, collide_mask)
if len(cannon_collides) > 0:
cannon_collides[0].kill()
self.manager.add_score(opt.score_cell_shoot)
cannon.start_transition(Cannon.RETURNING)
#cannon with enemy base -- only if cannon in firing state
#give points corresponding to enemy state and end level
#if enemy base is in shooting state, player also gets a life
if cannon.get_state_number() == Cannon.FIRING and collide_mask(cannon, enemy):
if enemy.get_state_number() == EnemyBase.MOVING:
self.manager.add_score(opt.score_mover_destroy)
elif enemy.get_state_number() == EnemyBase.SPINNING:
self.manager.add_score(opt.score_spinner_destroy)
elif enemy.get_state_number() == EnemyBase.SHOOTING:
self.manager.add_score(opt.score_shooter_destroy)
self.manager.give_life()
self.end_level()
#player's bullet with cell
#kill player bullet but remove cells in a cross pattern
#if somehow one bullet hits multiple cells one is arbitrarily selected
bc_collides = groupcollide(player_bullets, shield, True, False, collide_mask)
for current_bullet in bc_collides.keys():
self.manager.add_score(opt.score_cell_shoot)
shield.remove_cross(bc_collides[current_bullet][0])
def find_centermost_cell(self, cells):
"""Given a list of Cell sprites,
returns the one whose rect.centery is closest to the player's rect.centery
Returns None if list is empty
"""
closest_cell = None
for current_cell in cells:
current_dist = abs(current_cell.rect.centery - self.player.rect.centery)
if closest_cell is None or current_dist < closest_dist:
closest_cell = current_cell
closest_dist = current_dist
return closest_cell
def shoot(self):
"""If cannon can be fired, fires cannon.
Otherwise creates bullet moving from player's center along player's direction
as long as options.max_player_bullets won't be exeeded
"""
if collide_mask(self.player, self.ion_field):
return
if self.cannon.start_transition(Cannon.FIRING):
return
if len(self.player_bullets) < opt.max_player_bullets:
new_bullet = Bullet(opt.bullet_filename, opt.bullet_speed,
self.player.get_rect().center, self.player.get_direction())
self.player_bullets.add(new_bullet)
def reset_positions(self):
"""Moves sprites to their initial locations:
player starts in left center facing south and with 0 energy
player bullets are removed
enemy bullet starts on enemy base
enemy base is in moving state
cannon is in deactivated state
Note: shield configuration is not reset
"""
self.player.rect.midleft = (20, int(opt.height/2))
self.player.set_direction(vector.SOUTH)
self.player_bullets.empty()
self.enemy.resume_mover_state()
self.cannon.start_deactivated()
self.hbullet.rect.center = self.enemy.rect.center
def kill_player(self):
death_animation = DeathAnimation(self.manager, self.player, (self.enemy, self.shield), self,
opt.death_animation_delay, opt.death_animation_total_runtime)
self.manager.change_state(death_animation)
def end_level(self):
win_animation = WinAnimation(self.manager, self.player, opt.win_animation_total_runtime, opt.exp_field_args)
self.manager.change_state(win_animation)
示例8: Game
# 需要導入模塊: from pygame.sprite import Group [as 別名]
# 或者: from pygame.sprite.Group import empty [as 別名]
class Game(object):
title = 'Gravity'
screen_size = 1000, 750
def __init__(self,level=0):
pygame.init()
self.screen = pygame.display.set_mode(self.screen_size)
if self.title:
pygame.display.set_caption(self.title)
self.fps = 30
#group definitions
self.userPlacedObjects = Group()
self.startItems = RenderUpdates()
self.playerGroup = RenderUpdates()
self.tails = RenderUpdates()
self.blackHoles = RenderUpdates()
self.obstacles = RenderUpdates()
self.masslessObstacles = RenderUpdates()
self.goalCollide = Group()
self.toolbar = OrderedUpdates()
#level/transition/player & enemy/obstacle creation hocus pocus
self.goal = Goal(573,372,self.goalCollide,30)
self.bar = ToolBar(0,626,self.toolbar,self.screen,self,self.goal)
self.player = Player(50,535,self.screen,(255,0,0),self.playerGroup,1000,624,(2,-2),self.tails,self)
self.level = level
self.levelUp = True
self.stars = Starfield(self.screen,1000,626,200)
BlackHole(339,70,self.blackHoles,self.screen,80,71,16)
temp = EarthRounder(513,313,self.masslessObstacles,self.screen,40,0)
temp.rotate(55)
temp = Alien(60,188,self.masslessObstacles,self.screen,34,1)
temp.rotate(-15)
temp = Alien(107,268,self.masslessObstacles,self.screen,35,1)
temp.rotate(-75)
temp = Alien(816,533,self.masslessObstacles,self.screen,39,0)
temp.rotate(-13)
temp = BlueUpAnDown(811,227,self.masslessObstacles,self.screen,34,1,97,239)
temp.rotate(80)
self.obstacles.add(self.blackHoles)
self.obstacles.add(self.goalCollide)
self.freeb = False
self.gotoLevel = level
self.loaded = False
if system.thereIsASaveFile() and level == 0:
self.intro_screen = Intro(0,0,self.startItems,str('title_w_file.png'))
self.thereIsAFile = True
elif level == 0:
self.intro_screen = Intro(0,0,self.startItems)
self.thereIsAFile = False
def quit(self):
self.done = True
def level_0(self):
self.clock.tick(self.fps)
pygame.draw.rect(self.screen,(0,0,0),((0,0),(1000,750)))
for evt in pygame.event.get():
if evt.type == QUIT:
self.quit()
if evt.type == KEYDOWN:
if evt.key == K_ESCAPE:
self.quit()
elif evt.key == K_RETURN:
if not self.thereIsAFile:
self.transition = Transition(-1314,0,self.screen,self.startItems)
self.intro_screen.begin()
else:
loadingDial = system.Loading()
pygame.draw.rect(self.screen,(0,0,0),((0,0),(1000,750)))
self.startItems.draw(self.screen)
loadingDial.draw(self.screen)
pygame.display.flip()
self.loadFile(system.loadFile())
elif evt.key == K_RIGHT:
self.intro_screen.instruct(True)
elif evt.key == K_LEFT:
self.intro_screen.instruct(False)
elif evt.key == K_n:
if self.thereIsAFile:
self.transition = Transition(-1314,0,self.screen,self.startItems)
self.intro_screen.begin()
self.transition = Transition(-1314,0,self.screen,self.startItems)
elif evt.key == K_d:
if self.thereIsAFile:
os.remove('save.txt')
self.thereIsAFile = False
self.startItems.empty()
self.intro_screen = Intro(0,0,self.startItems)
if self.intro_screen.next_level():
self.level = 1
#.........這裏部分代碼省略.........
示例9: ViewManager
# 需要導入模塊: from pygame.sprite import Group [as 別名]
# 或者: from pygame.sprite.Group import empty [as 別名]
class ViewManager (pygame.sprite.Sprite):
def __init__ ( self, color, initial_position, size, player = None ):
"""Creates a new ViewManager object."""
#Sprite
pygame.sprite.Sprite.__init__(self)
self.image = pygame.Surface(size)
self.image.fill(color)
self.rect = self.image.get_rect()
self.rect.topleft = initial_position
#Drawable objects
if (player == None):
self.player = Character()
else: self.player = player
#Draw starting objects
#self.setup()
#Sprite Groups
self.activeObjects = Group()
self.activeBackground = Group()
self.activeAvatar = pygame.sprite.GroupSingle()
#Collision
self.collision = CollisionManager()
def setup(self):
"""Does nothing at this point."""
#self.image.blit(self.player.image, self.player.rect) #Draw player onto self
pass
def update(self):
"""Calls the update method of all active objects, checks for colisions with player."""
self.collision.update()
self.activeObjects.update()
self.activeBackground.update()
self.activeAvatar.update()
def setCurrentView ( self , view ):
"""Replaces current active objects with those of the passed view."""
if(DEBUG):print("Setting view");
self.activeBackground.empty() #Get rid of old background
self.activeObjects.empty() #Get rid of old objects
self.activeAvatar.empty() #Get rid of old Avatar
#Adds new background, objects, and avatar
self.activeBackground.add(view.background)
self.activeObjects.add(view.objects)
self.activeAvatar.add(view.avatar)
#Passes CollisionManager active objects
self.collision.setActiveObjects(self.activeObjects, self.activeAvatar)
pass
def drawView ( self ):
"""Draws sprites in the proper order for depth
1. Background
2. Objects
3. Player avatar
"""
self.activeBackground.draw(self.image)
self.activeObjects.draw(self.image)
self.activeAvatar.draw(self.image)
pass