Exemplo n.º 1
0
        public void Load(Area moveArea)
        {
            MoveArea = moveArea;

            _mesh = new TVMesh();
            _mesh = _gameManager.TvScene.CreateMeshBuilder();
            _mesh.CreateCylinder(15, 10, 100);

            _mesh.SetLightingMode(CONST_TV_LIGHTINGMODE.TV_LIGHTING_NORMAL);
            _mesh.SetMaterial(_gameManager.CurrentLevel.StandardMaterial);
            _mesh.ComputeNormalsEx();
            _mesh.SetShadowCast(true, true);

            _physicsBody = _gameManager.TvPhysics.CreateMeshBody(1000000, _mesh, CONST_TV_PHYSICSBODY_BOUNDING.TV_BODY_CYLINDER);

            _gameManager.TvPhysics.SetBodyMaterialGroup(_physicsBody, 0);

            _gameManager.TvPhysics.SetBodyPosition(_physicsBody, MoveArea.MidPoint.x, 14f, MoveArea.MidPoint.y);
        }