Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson3_diy1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b23e424c
authored
2 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
289308bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
0 deletions
DMEKD.py
dj.py
和.py
DMEKD.py
0 → 100644
View file @
b23e424c
import
pygame
import
sys
from
pygame.locals
import
from
settings
import
settings
from
game_player
import
game_player
import
game_functions
as
game_functions
from
pygame.sprite
import
Group
from
game_stats
import
GamesStats
from
game_boss
import
game_boss
from
button
import
button
This diff is collapsed.
Click to expand it.
dj.py
0 → 100644
View file @
b23e424c
n
=
input
(
"铭"
)
if
n
==
"sb"
:
print
(
"f"
)
else
:
print
(
"gun"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
和.py
0 → 100644
View file @
b23e424c
# Example file showing a circle moving on screen
# Example file showing a circle moving on screen
import
pygame
# pygame setup
pygame
.
init
()
screen
=
pygame
.
display
.
set_mode
((
1280
,
720
))
clock
=
pygame
.
time
.
Clock
()
running
=
True
dt
=
0
player_pos
=
pygame
.
Vector2
(
screen
.
get_width
()
/
2
,
screen
.
get_height
()
/
2
)
while
running
:
# poll for events
# pygame.QUIT event means the user clicked X to close your window
for
event
in
pygame
.
event
.
get
():
if
event
.
type
==
pygame
.
QUIT
:
running
=
False
# fill the screen with a color to wipe away anything from last frame
screen
.
fill
(
"purple"
)
pygame
.
draw
.
circle
(
screen
,
"red"
,
player_pos
,
40
)
keys
=
pygame
.
key
.
get_pressed
()
if
keys
[
pygame
.
K_w
]:
player_pos
.
y
-=
300
*
dt
if
keys
[
pygame
.
K_s
]:
player_pos
.
y
+=
300
*
dt
if
keys
[
pygame
.
K_a
]:
player_pos
.
x
-=
300
*
dt
if
keys
[
pygame
.
K_d
]:
player_pos
.
x
+=
300
*
dt
# flip() the display to put your work on screen
pygame
.
display
.
flip
()
# limits FPS to 60
# dt is delta time in seconds since last frame, used for framerate-
# independent physics.
dt
=
clock
.
tick
(
60
)
/
1000
pygame
.
quit
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment