本文整理匯總了Python中UIManager.UIManager.broadcast方法的典型用法代碼示例。如果您正苦於以下問題:Python UIManager.broadcast方法的具體用法?Python UIManager.broadcast怎麽用?Python UIManager.broadcast使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UIManager.UIManager
的用法示例。
在下文中一共展示了UIManager.broadcast方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: while
# 需要導入模塊: from UIManager import UIManager [as 別名]
# 或者: from UIManager.UIManager import broadcast [as 別名]
timeStart = now
#sample the input
results = ui.update()
if results:
rotations = [];
for result in results:
command = result;
# if this is a rotation...
if (command < 18):
rot = command / 2
reverse = command % 2
rotations.append( [rot, reverse] )
print "queuing rotation";
if ( grooviksCube.QueueRotation( rotations ) ):
ui.broadcast('L');
locked = True;
#handle any display management
display.loop();
wall_time = time.time();
while (wall_time < (sim_time - groovik.TIMESTEP / 3)):
ilogcnt += 1;
display.loop()
wall_time = time.time()
#print "Entering update";
keyframes, resync, rotationStep = grooviksCube.Update( sim_time );
display.renderFrames( keyframes, resync );