24 lines
582 B
Python
24 lines
582 B
Python
# Python imports
|
|
|
|
# Lib imports
|
|
from ursina import *
|
|
from ursina.prefabs.first_person_controller import FirstPersonController
|
|
|
|
# Application imports
|
|
from meshes.terrain import TerrainMesh
|
|
|
|
|
|
class World():
|
|
""" docstring for World. """
|
|
|
|
def __init__(self):
|
|
Sky()
|
|
FirstPersonController()
|
|
TerrainMesh()
|
|
|
|
self.cube = Entity(model='cube', color=hsv(300,1,1), scale=2, collider='box')
|
|
self.cube.on_click = self.spin
|
|
|
|
def spin(self):
|
|
self.cube.animate('rotation_y', self.cube.rotation_y+360, duration=2, curve=curve.in_out_expo)
|