在Ursina制作主屏幕



我目前正在用Ursina制作一个游戏,我一直在努力寻找一个代码来制作一个主启动屏幕来启动游戏或显示控件。

这是我的游戏代码:

game = Ursina()
ground = Entity(model = "untitled.blend", texture = "Soul Sand.jpg", scale = 400, collider = "mesh")
player = FirstPersonController(model = "player.blend", position = (-6.39844, 148.284, 62.5471),jump_height = 7, jump_duration = 0.5, speed = 10, texture = "Player Texture.jpg", collider = "mesh")
camera.z = None
health_bar = HealthBar(bar_color=color.lime.tint(-.25), roundness=.5, value=100)
def input(key):
if key == "shift":
player.speed = 25
elif key == "control":
player.speed = 10

house = Entity(model = "House.blend", texture = "Tree Texture.jpg", scale = 2, collider = "mesh", position = (0, 146.3, 15))
tree = Entity(model = "Tree.blend", scale = 15, texture = "Tree Texture.jpg", collider = "mesh", position = (15.5488, 140, 55.0674))
game.run()

您可以尝试只显示一个二维正方形的四元模型

Menuback=Entity(model="quad"scale=(10,10))

然后将其他实体分配给.enabled=False菜单变为真创建按钮并且onclick menuback.enabled=False其余od实体设置为true如果你需要看一些的东西,这是熊的文档

https://www.ursinaengine.org/api_reference.html

相关内容

  • 没有找到相关文章

最新更新