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

Commit

Permalink
Update database construction
Browse files Browse the repository at this point in the history
Change player bullet speed
  • Loading branch information
Virashu committed Feb 3, 2024
1 parent 2faa240 commit 2992a44
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
Binary file modified assets/DataBase.db
Binary file not shown.
21 changes: 19 additions & 2 deletions danmaku/database/construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@


db.connect()

#
# EnemyTypes
#

db.drop_tables([EnemyTypes])
db.create_tables([EnemyTypes])


basic_enemy = EnemyTypes.create(
name="basic enemy",
texture_file="basic_enemy_2.png;basic_enemy_1.png;"
Expand Down Expand Up @@ -55,6 +59,12 @@
)
boss.save()

#
# BulletTypes
#

db.drop_tables([BulletTypes])
db.create_tables([BulletTypes])

basic_enemy_bullet = BulletTypes.create(
name="basic enemy bullet",
Expand All @@ -72,12 +82,19 @@
enemy=False,
texture_file="bullet.png",
radius=10,
speed=150,
speed=300,
vx=0,
vy=-1,
)
basic_player_bullet.save()

#
# PlayerTypes
#

db.drop_tables([PlayerTypes])
db.create_tables([PlayerTypes])

player = PlayerTypes.create(
name="player",
texture_file="player_idle_left.png;player_left_1.png;player_left_2.png;player_left_3.png;"
Expand Down
5 changes: 3 additions & 2 deletions danmaku/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Application entry point."""

import vgame
from vgame import Runner

from danmaku.menu import Menu
from danmaku.game import Game
Expand All @@ -10,7 +10,7 @@
WIDTH, HEIGHT = 300, 500


runner = vgame.Runner()
runner = Runner()

while runner.running:
menu = Menu(width=WIDTH, height=HEIGHT, title="Danmaku | Menu")
Expand All @@ -28,3 +28,4 @@
case "history":
history = History(width=WIDTH, height=HEIGHT, title="Danmaku | History")
runner.run(history)

4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2992a44

Please sign in to comment.