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
from dataclasses import dataclass | |
import numpy | |
import pygame | |
from pygame import Vector2 | |
WINDOW_WIDTH = 500 | |
WINDOW_HEIGHT = 400 | |
MAX_FPS = 60 |
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
from heat2d import * | |
engine = Engine() | |
engine.window.title = "Heat2D UI Testing" | |
engine.window.clear_color = (255, 255, 255) | |
class Mario(GameObject): | |
def __init__(self): | |
super().__init__() |
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
import pygame | |
display = None | |
fade_surface = None | |
tick = 0 | |
speed = 10 | |
anim_state = None | |
anim_func = None | |
def init(): |
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
import pygame | |
from math import hypot | |
class Point: | |
def __init__(self, point): | |
self.x = point[0] | |
self.y = point[1] | |
def __add__(self, other): |