Start.ts 619 B

1234567891011121314151617181920212223242526272829
  1. import { _decorator, Component, Node, Vec3, tween } from 'cc';
  2. const { ccclass, property } = _decorator;
  3. @ccclass('Start')
  4. export class Start extends Component {
  5. @property(Node)
  6. bar:Node=null;
  7. @property(Node)
  8. logoPic:Node=null;
  9. start() {
  10. //this.bar.setScale(2,1);
  11. this.Loading();
  12. this.Logo();
  13. }
  14. Logo(){
  15. }
  16. Loading(){
  17. tween(this.bar)
  18. .call(()=>{this.bar.setScale(0,1)})
  19. .to(2,{scale:new Vec3(2,1)})
  20. .call(()=>{this.bar.setScale(1.5,1)})
  21. .start();
  22. }
  23. update(deltaTime: number) {
  24. }
  25. }