def AddObject(): global listDraw global listPlatformCollider global listEnemy # add the ground ground = COMP.GameObject() ground.SetSolid(RED,800,300) ground.rect.y = 500 # Create enemy. Info2 = COMP.GameObject() Info2.SetSprite(alien) Info2.objectName = "alien" Info2.SetLocation([750,410]) listDraw.add(ground) listDraw.add(Info2) listPlatformCollider.add(ground) listEnemy.append(Info2)
def AddEnemy(enemy): Info2 = COMP.GameObject() if(enemy == 5): Info2.SetSprite(flyingAlien) Info2.SetLocation([750, 215]) else: Info2 .SetSprite(alien) Info2.SetLocation([750, 410]) Info2.objectName = "alien" listDraw.add(Info2) listEnemy.append(Info2)