summaryrefslogtreecommitdiff
path: root/src/sliceitoff/player/player.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliceitoff/player/player.py')
-rw-r--r--src/sliceitoff/player/player.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/sliceitoff/player/player.py b/src/sliceitoff/player/player.py
index c062f1c..9235dc3 100644
--- a/src/sliceitoff/player/player.py
+++ b/src/sliceitoff/player/player.py
@@ -1,8 +1,10 @@
import os
import pygame
+from random import randrange
+
from display import Scaling
-from images import Images
+from images import Fonts
DEBUG = os.getenv("DEBUG")
@@ -21,9 +23,17 @@ class Player(pygame.sprite.LayeredUpdates):
def __init__(self):
super().__init__()
self.position = (0,0)
- self.direction = True
+ self.direction = False
self.lazer = False
- image = Images.surfaces['player_00']
+ image = pygame.Surface((8,26), pygame.SRCALPHA)
+ for color, y, ch in (
+ ("red",0,0x18),
+ ("red",13,0x19),
+ ("blue",6,0x09)):
+ ch = Fonts.fonts['standard'].get(ch)
+ ch.fill( color, special_flags = pygame.BLEND_RGBA_MULT)
+ image.blit(ch,(0,y))
+ image = pygame.transform.scale_by(image, 1_200 * Scaling.factor)
self.add(PlayerSprite(image), layer = 0)
image = pygame.transform.rotate(image, 90)
self.add(PlayerSprite(image), layer = 1)