prelude-dare-55/actors/actor.py

26 lines
570 B
Python
Raw Permalink Normal View History

2024-04-06 12:24:08 +00:00
import pygame
import numpy as np
class Actor:
def __init__(self, world):
self.world = world
self.pos = np.array([64.0, 64.0])
self.size = np.array([48.0, 48.0])
self.color = pygame.Color(0, 0, 255)
self.speed = 192.0
def draw(self, screen):
pygame.draw.rect(screen, self.color, (
self.pos[0] - self.size[0]/2,
self.pos[1] - self.size[1]/2,
self.size[0],
self.size[1]
))
def update(self, dt):
pass
def phy_update(self, dt):
pass