Pause.ts 481 B

12345678910111213141516171819202122232425262728293031
  1. import { _decorator, Component, director, Node } from 'cc';
  2. const { ccclass, property } = _decorator;
  3. @ccclass('Pause')
  4. export class Pause extends Component {
  5. start() {
  6. }
  7. onBtnResume(){
  8. director.resume();
  9. }
  10. onBtnRestart(){
  11. director.reset();
  12. }
  13. onBtnSelect(){
  14. console.log("选择关卡");
  15. }
  16. onBtnQuit(){
  17. director.resume();
  18. console.log("Quit");
  19. }
  20. update(deltaTime: number) {
  21. }
  22. }