/**
* 创建旋转台阶
* @param steps 台阶数
*/
private creatSlide(steps: number) {
// 固定缩放(将一个正方体缩放成台阶状)
const SCALE = new Type.Vector(5, 1.5, 0.3)
// 台阶位置
let tempLoc = new Type.Vector(0, 0, 0);
// 台阶旋转
let tempRotate = new Type.Rotation(0, 0, 0);
let index = 0
let inter = setInterval(async () => {
let step = await Core.GameObject.asyncSpawnGameObject("7669");
step.worldScale = SCALE;
// 打开台阶碰撞
step.setCollision(Type.CollisionStatus.On);
// 创建材质实例
(step as Gameplay.StaticMesh).createMaterialInstance(0);
// 给台阶随机添加一个颜色
(step as Gameplay.StaticMesh).setMaterialColor(0, Type.LinearColor.colorToLinearColor(Math.random() * 255, Math.random() * 255, Math.random() * 255, 255))
tempLoc.z = 30 * index
tempLoc.y = -75 * index
tempRotate.z = 10 * index