马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
renpy:
[RenPy] 纯文本查看 复制代码 init python:
import game
label start:
"h""aaaaaaaa"
"j""bbbbbbbb"
$game.main()#调用main函数启动
scene rr
"m""ccccccccccc"
return
python:
[RenPy] 纯文本查看 复制代码 import random
import renpy, os
import pygame, sys
from pygame.locals import *
from random import randint
def main():
pygame.init()
main = pygame.display.set_mode((800,600))
pygame.display.set_caption('游戏')
bg = pygame.image.load(os.path.join(renpy.game.basepath, "bg.jpg"))
te = pygame.image.load(os.path.join(renpy.game.basepath, "te.png"))
text = pygame.font.SysFont("SimHei", 35)
clock = pygame.time.Clock()
time_passed = clock.tick()
time_passed = clock.tick(60)
bombs = []
bads = []
FPS = 60
a = 500
while True:
x, y = pygame.mouse.get_pos()
if x > 499:
x = 499
x = x - 100
if y > 329:
y = 329
y = y - 100
x = x + 25
a = a - 1
main.blit(bg,(0,0))
for event in pygame.event.get():
if event.type == QUIT:
return
main.blit(te,(x,y))
pygame.display.update()
pygame.time.delay(FPS)
|