新西兰急~~有沒有學IT的小哥哥能幫我寫個NS diagram
在新西兰
10:00 要交考試了 誰能很快幫我寫一下NS diagram 小妹感激不盡啊
很簡單 發到我信箱wechat 都可以
hahahavanessa
[email protected]
天維的盤板有點怪 給我email 發給你
import sysimport pygamefrom Content import pygbuttonfrom pygame.locals import *pygame.init()#Initialize variablesstartBlue =0,0,255skyBlue = 50,120,255grassGreen = 75,180,75treeGreen = 0,100,0treeBrown = 100,100,0TRANSPARENT = 0,255,255black= 0,0,0carColour= 255,0,0building= 173,216,230Silver=192,192,192White=255,255,255carFront=250,128,114buildTop=220,220,220wind=245,245,245buildBlue=70,130,180#small buildingbridge=128,128,128#Setup the surfaceswindowSurface = pygame.display.set_mode( (1200,800))pygame.display.set_caption("Future city")backgroundSurface = pygame.Surface( (1200,800) )#Give the windowSurface an initial colourpygame.draw.rect( backgroundSurface, startBlue, (0, 0, 1200, 800) )#Draw Background on backgroundSurfacepygame.draw.rect( backgroundSurface, skyBlue , (0, 0, 1200, 600) ) #Skypygame.draw.rect( backgroundSurface, grassGreen , (0, 600, 1200, 200) ) #Ground#Draw Tree on treeSurfacetreeSurface = pygame.Surface( (100, 250) )treeSurface.set_colorkey(TRANSPARENT)pygame.draw.rect( treeSurface, TRANSPARENT , (0, 0, 100, 250) )pygame.draw.polygon(treeSurface, treeGreen, [(55,10),(15,100),(95,100)],0)pygame.draw.circle(treeSurface, treeGreen, (55,100), 40, 0)pygame.draw.circle(treeSurface, treeGreen, (55,150), 40, 0)pygame.draw.rect( treeSurface, treeBrown , (50, 190, 10, 60) )# CarcarSurface = pygame.Surface((200, 250))carSurface.set_colorkey(TRANSPARENT)pygame.draw.rect( carSurface, skyBlue , (0, 0, 200, 250))pygame.draw.ellipse( carSurface, carColour , (1, 100, 180, 60)) #car bottompygame.draw.circle( carSurface, carColour , (160,115), 35, 0) #car toppygame.draw.rect( carSurface, black , (160, 55, 2, 25))#antipygame.draw.ellipse(carSurface, White,(30, 110, 50, 20))#ellipse window#pygame.draw.circle(carSurface, Silver, (50,170), 20, 0)#pygame.draw.circle(carSurface, Silver, (150,170), 20, 0)# BuildingbuildingSurface = pygame.Surface((100, 600))buildingSurface.set_colorkey(TRANSPARENT)pygame.draw.rect( buildingSurface, TRANSPARENT , (0, 0, 100, 600))pygame.draw.rect( buildingSurface, building , (0, 50, 100, 550))#main buildingpygame.draw.polygon(buildingSurface, buildTop,[(0,0),(0,50),(100,50)],0)#trianglebuildingSurface2 = pygame.Surface((150, 700))buildingSurface2.set_colorkey(TRANSPARENT)pygame.draw.rect( buildingSurface2, TRANSPARENT , (0, 0, 150, 700))pygame.draw.rect( buildingSurface2, building , (0, 50, 150, 650))#main buildingpygame.draw.polygon(buildingSurface2, buildTop,[(150,0),(0,50),(150,50)],0)#triangle# bridgebridgeSurface = pygame.Surface((170, 40))bridgeSurface.set_colorkey(TRANSPARENT)pygame.draw.rect( bridgeSurface, TRANSPARENT , (0, 0, 170, 40))pygame.draw.rect( bridgeSurface, bridge , (0, 0, 170, 40))#bridge gray / grey# Small BuildingsmallbuildSurface = pygame.Surface((400, 300))smallbuildSurface.set_colorkey(TRANSPARENT)pygame.draw.rect( smallbuildSurface, TRANSPARENT , (0, 0, 400, 300))pygame.draw.circle(smallbuildSurface, buildBlue, (80,100), 80, 0)pygame.draw.circle(smallbuildSurface, buildBlue, (320,100), 80, 0)pygame.draw.rect(smallbuildSurface, bridge, (160, 80, 80, 40))pygame.draw.rect(smallbuildSurface, Silver, (160, 120, 20, 180))#pillarpygame.draw.rect(smallbuildSurface, Silver, (220, 120, 20, 180))#pillar# windwindSurface = pygame.Surface((200, 200))windSurface.set_colorkey(TRANSPARENT)pygame.draw.rect( windSurface, skyBlue , (0, 0, 200, 200))pygame.draw.ellipse(windSurface, wind,(1, 50, 100, 78))#ellipse wind white smokepygame.draw.ellipse(windSurface, wind,(40, 90, 100, 78))#ellipse windpygame.draw.ellipse(windSurface, wind,(80, 120, 100, 78))#ellipse windpygame.draw.ellipse(windSurface, wind,(90, 90, 100, 78))#ellipse windpygame.draw.ellipse(windSurface, wind,(30, 20, 100, 78))#ellipse windpygame.draw.ellipse(windSurface, wind,(50, 110, 100, 78))#ellipse windpygame.draw.ellipse(windSurface, wind,(60, 10, 100, 78))#ellipse windpygame.draw.ellipse(windSurface, wind,(70, 60, 100, 70))#ellipse wind#Create buttonsbuttonStart = pygbutton.PygButton((10, 10, 150, 30), "START")buttonExit= pygbutton.PygButton((140, 10, 100, 30), "EXIT")#Event Loopfinish=Falseplay = False xCar = 600xWind = 980xCarJump = -1xWindJump = -1startbuttonFlag=Falsewhile finish == False: #Check Events for event in pygame.event.get(): if event.type == pygame.QUIT: finish = True if "up" in buttonExit.handleEvent(event): finish = True if "up" in buttonStart.handleEvent(event): startbuttonFlag = True play = True windowSurface.blit(backgroundSurface,(0,0)) windowSurface.blit(buildingSurface, (30, 190)) windowSurface.blit(buildingSurface2, (300, 90)) windowSurface.blit(bridgeSurface, (130, 300)) windowSurface.blit(smallbuildSurface, (500, 490)) for count in range(0,2): windowSurface.blit(treeSurface, (1100 - 100*count, 540) ) if play == True and startbuttonFlag==True: ####### Move Car and Wind ######## xCar = xCar + xCarJump if xCar <= 500: xCarJump = -xCarJump xWind = xWind + xWindJump if xWind <= 780: xWindJump = -xWindJump windowSurface.blit(carSurface, (xCar,200)) windowSurface.blit(windSurface, (xWind, 100)) #pygame.display.update() if startbuttonFlag==False : #Update Screen windowSurface.blit(backgroundSurface,(0,0)) windowSurface.blit(buildingSurface, (30, 190)) windowSurface.blit(buildingSurface2, (300, 90)) windowSurface.blit(bridgeSurface, (130, 300)) windowSurface.blit(smallbuildSurface, (500, 490)) for count in range(0,2): windowSurface.blit(treeSurface, (1100 - 100*count, 540) ) buttonStart.draw(windowSurface) buttonExit.draw(windowSurface) pygame.display.update()#Quitpygame.quit()sys.exit()
评论
我汗。。。。。。这乱码怎么看?你不先排一下版吗?
评论
FML观光团报道
评论
我表示楼上的是干IT的小哥哥
评论
老白出马,一个顶两
评论
10点都已经过了, LZ这考试给的多长时间啊 lol
评论
稍微可以看一看了,原来是画动画。坐等Python高手进。
import sys
import pygame from Content
import pygbutton from pygame.locals
import *
pygame.init()
#Initialize
variables
startBlue =0,0,255
skyBlue = 50,120,255
grassGreen = 75,180,75
treeGreen = 0,100,0
treeBrown = 100,100,0
TRANSPARENT = 0,255,255
black= 0,0,0
carColour= 255,0,0
building= 173,216,230
Silver=192,192,192
White=255,255,255
carFront=250,128,114
buildTop=220,220,220
wind=245,245,245
buildBlue=70,130,180
#small buildingbridge=128,128,128
#Setup the surfaces
windowSurface = pygame.display.set_mode( (1200,800))
pygame.display.set_caption("Future city")
backgroundSurface = pygame.Surface( (1200,800) )
#Give the windowSurface an initial
colourpygame.draw.rect( backgroundSurface, startBlue, (0, 0, 1200, 800) )
#Draw Background on backgroundSurface
pygame.draw.rect( backgroundSurface, skyBlue , (0, 0, 1200, 600) )
#Skypygame.draw.rect( backgroundSurface, grassGreen , (0, 600, 1200, 200) )
#Ground
#Draw Tree on treeSurface
treeSurface = pygame.Surface( (100, 250) )
treeSurface.set_colorkey(TRANSPARENT)
pygame.draw.rect( treeSurface, TRANSPARENT , (0, 0, 100, 250) )
pygame.draw.polygon(treeSurface, treeGreen, [(55,10),(15,100),(95,100)],0)
pygame.draw.circle(treeSurface, treeGreen, (55,100), 40, 0)
pygame.draw.circle(treeSurface, treeGreen, (55,150), 40, 0)
pygame.draw.rect( treeSurface, treeBrown , (50, 190, 10, 60) )
#
CarcarSurface = pygame.Surface((200, 250))
carSurface.set_colorkey(TRANSPARENT)
pygame.draw.rect( carSurface, skyBlue , (0, 0, 200, 250))
pygame.draw.ellipse( carSurface, carColour , (1, 100, 180, 60))
#car
bottompygame.draw.circle( carSurface, carColour , (160,115), 35, 0)
#car
toppygame.draw.rect( carSurface, black , (160, 55, 2, 25))
#anti
pygame.draw.ellipse(carSurface, White,(30, 110, 50, 20))
#ellipse window
#
pygame.draw.circle(carSurface, Silver, (50,170), 20, 0)
#
pygame.draw.circle(carSurface, Silver, (150,170), 20, 0)
#
BuildingbuildingSurface = pygame.Surface((100, 600))
buildingSurface.set_colorkey(TRANSPARENT)
pygame.draw.rect( buildingSurface, TRANSPARENT , (0, 0, 100, 600))
pygame.draw.rect( buildingSurface, building , (0, 50, 100, 550))
#main
buildingpygame.draw.polygon(buildingSurface, buildTop,[(0,0),(0,50),(100,50)],0)
#
trianglebuildingSurface2 = pygame.Surface((150, 700))
buildingSurface2.set_colorkey(TRANSPARENT)
pygame.draw.rect( buildingSurface2, TRANSPARENT , (0, 0, 150, 700))
pygame.draw.rect( buildingSurface2, building , (0, 50, 150, 650))
#main
buildingpygame.draw.polygon(buildingSurface2, buildTop,[(150,0),(0,50),(150,50)],0)
#triangle#
bridgebridgeSurface = pygame.Surface((170, 40))
bridgeSurface.set_colorkey(TRANSPARENT)
pygame.draw.rect( bridgeSurface, TRANSPARENT , (0, 0, 170, 40))
pygame.draw.rect( bridgeSurface, bridge , (0, 0, 170, 40))
#bridge gray / grey
# Small Building
smallbuildSurface = pygame.Surface((400, 300))
smallbuildSurface.set_colorkey(TRANSPARENT)
pygame.draw.rect( smallbuildSurface, TRANSPARENT , (0, 0, 400, 300))
pygame.draw.circle(smallbuildSurface, buildBlue, (80,100), 80, 0)
pygame.draw.circle(smallbuildSurface, buildBlue, (320,100), 80, 0)
pygame.draw.rect(smallbuildSurface, bridge, (160, 80, 80, 40))
pygame.draw.rect(smallbuildSurface, Silver, (160, 120, 20, 180))
#pillar
pygame.draw.rect(smallbuildSurface, Silver, (220, 120, 20, 180))
#pillar#
windwindSurface = pygame.Surface((200, 200))
windSurface.set_colorkey(TRANSPARENT)
pygame.draw.rect( windSurface, skyBlue , (0, 0, 200, 200))
pygame.draw.ellipse(windSurface, wind,(1, 50, 100, 78))
#ellipse wind white smoke
pygame.draw.ellipse(windSurface, wind,(40, 90, 100, 78))
#ellipse wind
pygame.draw.ellipse(windSurface, wind,(80, 120, 100, 78))
#ellipse wind
pygame.draw.ellipse(windSurface, wind,(90, 90, 100, 78))
#ellipse wind
pygame.draw.ellipse(windSurface, wind,(30, 20, 100, 78))
#ellipse wind
pygame.draw.ellipse(windSurface, wind,(50, 110, 100, 78))
#ellipse wind
pygame.draw.ellipse(windSurface, wind,(60, 10, 100, 78))
#ellipse wind
pygame.draw.ellipse(windSurface, wind,(70, 60, 100, 70))
#ellipse wind
#Create buttons
buttonStart = pygbutton.PygButton((10, 10, 150, 30), "START")
buttonExit= pygbutton.PygButton((140, 10, 100, 30), "EXIT")
#Event Loop
finish=False
play = False
xCar = 600
xWind = 980
xCarJump = -1
xWindJump = -1
startbuttonFlag=False
while finish == False:
#Check Events
for event in pygame.event.get():
if event.type == pygame.QUIT:
finish = True
if "up" in buttonExit.handleEvent(event):
finish = True
if "up" in buttonStart.handleEvent(event):
startbuttonFlag = True
play = True
windowSurface.blit(backgroundSurface,(0,0))
windowSurface.blit(buildingSurface, (30, 190))
windowSurface.blit(buildingSurface2, (300, 90))
windowSurface.blit(bridgeSurface, (130, 300))
windowSurface.blit(smallbuildSurface, (500, 490))
for count in range(0,2):
windowSurface.blit(treeSurface, (1100 - 100*count, 540) )
if play == True and startbuttonFlag==True:
####### Move Car and Wind ########
xCar = xCar + xCarJump
if xCar <= 500:
xCarJump = -xCarJump
xWind = xWind + xWindJump
if xWind <= 780:
xWindJump = -xWindJump
windowSurface.blit(carSurface, (xCar,200))
windowSurface.blit(windSurface, (xWind, 100))
#pygame.display.update()
if startbuttonFlag==False :
#Update Screen
windowSurface.blit(backgroundSurface,(0,0))
windowSurface.blit(buildingSurface, (30, 190))
windowSurface.blit(buildingSurface2, (300, 90))
windowSurface.blit(bridgeSurface, (130, 300))
windowSurface.blit(smallbuildSurface, (500, 490))
for count in range(0,2):
windowSurface.blit(treeSurface, (1100 - 100*count, 540)
buttonStart.draw(windowSurface)
buttonExit.draw(windowSurface)
pygame.display.update()
#Quit
pygame.quit()
sys.exit()
评论
你真厉害,竟然还把代码格式化。。。。
评论
妹子这颜值
一堆大叔叔小哥哥争相帮忙
评论
对的,这颜值做IT可惜了,辐射大啊。
评论
跟哪个高富帅看对眼了
还用愁毕业么
评论
叔叔来了,,,妹子们快来吧,,,,我都懂我很厉害的
评论
抠脚大汉
快去拯救那个美女
评论
不不不,,我不喜欢这个妹子,我比较喜欢你
评论
眼瞎了
要赶紧去治
还有每天记得吃药
吃完了记得看看瓶子
吃错了没
评论
How about no
评论
FML观光团报道
评论
希望你考得不错。。。
评论
FML观光团报道看妹子~~~
评论
FML观光团。。。。。。
评论
FML观光团报道