本文整理汇总了Python中engine.Engine.get方法的典型用法代码示例。如果您正苦于以下问题:Python Engine.get方法的具体用法?Python Engine.get怎么用?Python Engine.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类engine.Engine
的用法示例。
在下文中一共展示了Engine.get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from engine import Engine [as 别名]
# 或者: from engine.Engine import get [as 别名]
def __init__(self, v, i):
self.__T = mat4()
v_buff = numpy.array(v, dtype=numpy.float32)
i_buff = numpy.array(i, dtype=numpy.int16)
self.__v_hdl = glGenBuffers(1)
self.__i_hdl = glGenBuffers(1)
self.__i_size = adt.arrayByteCount(i_buff) * 2
glBindBuffer(GL_ARRAY_BUFFER, self.__v_hdl)
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, self.__i_hdl)
glBufferData(GL_ARRAY_BUFFER, adt.arrayByteCount(v_buff), adt.voidDataPointer(v_buff), GL_STATIC_DRAW)
glBufferData(GL_ELEMENT_ARRAY_BUFFER, adt.arrayByteCount(i_buff), adt.voidDataPointer(i_buff), GL_STATIC_DRAW)
if glGetError() != GL_NO_ERROR:
raise RuntimeError('mesh create error!')
Engine.get().add_object(Engine.get(), self)
示例2: __init__
# 需要导入模块: from engine import Engine [as 别名]
# 或者: from engine.Engine import get [as 别名]
def __init__(self):
self.engine = Engine.get()
self.scrollX = 0
self.scrollY = 0
self.map = Tilemap('test')
self.blockers = [self.map]
self.buttonMounts = []
self.goMgr = GameObjectManager()
self.player = None
for spawn in self.map.spawns:
self.doSpawn(spawn)
self.goMgr.onMapLoaded()
self.services = {}
示例3: Engine
# 需要导入模块: from engine import Engine [as 别名]
# 或者: from engine.Engine import get [as 别名]
from engine import Engine
from tilemap import Tilemap
Engine()
Engine.get().run()