コード例 #1
0
ファイル: pacman1.py プロジェクト: Muneop/oss_moonup
def initDots():
    global pacDots
    pacDots = []
    a = x = 0
    while x < 30:
        y = 0
        while y < 29:
            if gamemaps.checkDotPoint(10 + x * 20, 10 + y * 20):
                pacDots.append(Actor("dot", (10 + x * 20, 90 + y * 20)))
                pacDots[a].status = 0
                a += 1
            y += 1
        x += 1
コード例 #2
0
def initDots():
    global pacDots
    pacDots = []
    a = x = 0
    while x < 30:
        y = 0
        while y < 29:
            d = gamemaps.checkDotPoint(10 + x * 20, 10 + y * 20)
            if d == 1:
                pacDots.append(Actor("dot", (10 + x * 20, 90 + y * 20)))
                pacDots[a].status = 0
                pacDots[a].type = 1
                a += 1
            if d == 2:
                pacDots.append(Actor("power", (10 + x * 20, 90 + y * 20)))
                pacDots[a].status = 0
                pacDots[a].type = 2
                a += 1
            y += 1
        x += 1