我是新手使用cocos 2d python我现在面临一个问题:我想将FPS限制在60以下,但似乎python cocos2d框架并没有提供限制FPS的界面。
我的代码框架如下:
# -*- coding: utf-8 -*-
import cocos
import pyglet
from cocos.actions import *
from cocos.director import *
from cocos.scene import *
from game_controller import *
import common
def main():
#initialize director
director.init( width=common.visibleSize["width"], height=common.visibleSize["height"], caption="Flappy Bird")
#turn off display FPS
#director.show_FPS = True
#run
gameScene = Scene()
game_start(gameScene)
if director.scene:
director.replace(gameScene)
else:
director.run(gameScene)
有谁知道如何解决这个问题? Thanx提前!