当前位置: 首页>>代码示例>>Python>>正文


Python Player.y方法代码示例

本文整理汇总了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)
开发者ID:theepicsnail,项目名称:TestingArea,代码行数:32,代码来源:Main.py

示例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()
开发者ID:Stever1975,项目名称:Scriptorium,代码行数:33,代码来源:pyDungeon.py

示例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()
开发者ID:RonnieLMayberry,项目名称:PAP-CS,代码行数:31,代码来源:Game.py


注:本文中的Player.y方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。