本文整理汇总了Python中Player.y方法的典型用法代码示例。如果您正苦于以下问题:Python Player.y方法的具体用法?Python Player.y怎么用?Python Player.y使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Player
的用法示例。
在下文中一共展示了Player.y方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Player
# 需要导入模块: import Player [as 别名]
# 或者: from Player import y [as 别名]
weapons[K_7] = PowerBullet
weapons[K_p] = PlayerSpawn
ammo = {}
ammo[Bullet] = 1000
ammo[SplitBullet] = 10000
ammo[AngleBullet] = 1000
ammo[PowerBullet] = 1000
ammo[CarpetBomb] = 100
ammo[PineappleBomb] = 500
ammo[PlayerSpawn] = 100
ammo[Frag] = 1000
ammo[None] = 0
p1 = Player(universe)
p1.x = 90
p1.y = 200
p1.color = [255, 0, 0]
player = p1
p2 = Player(universe)
p2.x = 510
p2.y = 400
p1.color = [128, 64, 192]
dt = 0
power = 121
keys = set()
curWep = None
TopLeft = (0, 0)
示例2: dMap
# 需要导入模块: import Player [as 别名]
# 或者: from Player import y [as 别名]
from Item import *
from functions import *
showInventory=False
npcs=[]
Inventory=[]
items=[]
gameState=0
Rmap= dMap()
Rmap.makeMap(startx,starty,110,50,60)
pos=PlacePlayer(Rmap)
guy=Player()
guy.x=pos[0]
guy.y=pos[1]
npcs=generateList(Rmap,npcs,Enemy,.09)
Rmap=PlaceList(Rmap,npcs,9)
attack=False
items=generateList(Rmap,items,Item,.07)
Rmap=PlaceList(Rmap,items,6)
def restart2():
global showInventory,npcs,Rmap,gameState,guy
print "hello"
showInventory=False
npcs=[]
Inventory=[]
items=[]
gameState=0
Rmap= dMap()
示例3: game_init
# 需要导入模块: import Player [as 别名]
# 或者: from Player import y [as 别名]
#define ASCII codes used for dungeon
TILE_EMPTY = 177
TILE_ROOM = 31
TILE_HALL = 31
#main program begins
game_init()
game_over = False
last_time = 0
dungeon = Dungeon(30, 30)
dungeon.generate(TILE_EMPTY,TILE_ROOM,TILE_HALL)
player = Player(dungeon, 1, "Player")
player.x = dungeon.entrance_x+1
player.y = dungeon.entrance_y+1
level = 1
message_text = "Welcome, brave adventurer!"
message_color = 0,200,50
draw_radius = False
#used to estimate attack damage
att = list(0 for n in range(0,5))
attlow=90
atthigh=0
#main loop
while True:
timer.tick(30)
ticks = pygame.time.get_ticks()