loadingView.ts 422 B

12345678910111213141516171819
  1. const {ccclass, property} = cc._decorator;
  2. @ccclass
  3. export default class loadingView extends cc.Component {
  4. @property(cc.ProgressBar)
  5. progress: cc.ProgressBar = null;
  6. UpdateProgress(percent:number){
  7. this.progress.progress = percent;
  8. }
  9. public ShowProgress(){
  10. this.node.active = true;
  11. this.progress.node.active = true;
  12. this.progress.progress = 0;
  13. }
  14. }