squidGame/tgx-games-client/assets/module_arean/scripts/common/CameraOrbit.ts

15 lines
394 B
TypeScript

// CameraOrbit.ts
import { _decorator, Component, Node, Vec3, tween } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('CameraOrbit')
export class CameraOrbit extends Component {
start() {
tween(this.node)
.repeatForever(
tween()
.to(360, { eulerAngles: new Vec3(0, 360, 0) })
)
.start();
}
}