Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

Commit

Permalink
Update mecs
Browse files Browse the repository at this point in the history
  • Loading branch information
Virashu committed Feb 18, 2024
1 parent c42e9dd commit 7b5ed36
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
8 changes: 4 additions & 4 deletions danmaku/game/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ def __init__(
self,
xy: tuple[int | float, int | float],
object_type: str,
bombs:int=0,
lives:int=1,
updated_hp:int=0,
bombs: int = 0,
lives: int = 1,
updated_hp: int = 0,
) -> None:
args = get_player_type(object_type)

health:int|float = updated_hp or args["hp"] * lives
health: int | float = updated_hp or args["hp"] * lives

super().__init__(
xy,
Expand Down
19 changes: 15 additions & 4 deletions docs/mecs.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,38 +94,49 @@ classDiagram
rect: Rect
}
class GameObject {
x: int
y: int
x, y: int
vx, vy: float [-1;1]
width, height: int
hitbox_radius: int
speed: int
update()
draw()
collision() -> bool
}
class Entity {
health: int
damage: int
endurance: float
get_damage()
}
class Shooter {
shoot_freq: float
last_shot: float
can_shoot() -> bool
shoot()
shoot() -> list[Bullet]
}
class Player {
player_type: str
score: int
power: int
}
class Enemy {
enemy_type: str
cost: int
}
class Animated {
animation_frames: list[str]
animation_current: int
animation_period: float
can_animate() -> bool
animate()
}
class Bullet {
bullet_type: str
}
class Background {
Expand Down

0 comments on commit 7b5ed36

Please sign in to comment.