-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f75632
commit 468c81f
Showing
6 changed files
with
100 additions
and
6 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import pygame | ||
from pygame.sprite import Sprite | ||
from os.path import dirname, abspath, join | ||
path = dirname(dirname(abspath(__file__))) | ||
|
||
class Alien(Sprite): | ||
"""A single alien""" | ||
|
||
def __init__(self, ai_game): | ||
|
||
super().__init__() | ||
self.screen = ai_game.screen | ||
|
||
self.image = pygame.image.load(join(path, "img", "alien.bmp")) | ||
self.rect = self.image.get_rect() | ||
|
||
#Start position | ||
self.rect.x = self.rect.width | ||
self.rect.y = self.rect.height | ||
|
||
#Decimal value for horizontal position | ||
self.x = float(self.rect.x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters