26 lines
570 B
Python
26 lines
570 B
Python
|
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
|
||
|
|