jhsD3BQUzrckXHMC.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { Vl2h6kBYov1uNSwzL7 } from "./koffTaS";
  2. import game_config_dyn from "./game_config_dyn";
  3. import game_core from "./game_core";
  4. const {ccclass, property} = cc._decorator;
  5. //loading 逻辑是,首先一个白色背影加logo ,停留2s,然后一个加载进进度图标,4s, 如果此时 AB已经判断出,则进入AB,否则直接进入到A。在A 中如果判断出是B ,则跳到B
  6. @ccclass
  7. export default class NewClass extends cc.Component {
  8. @property(cc.Prefab)
  9. public tileBlock:cc.Prefab=null
  10. @property(cc.Label)
  11. wxOdV3NSqeDk2e2Prog: cc.Label = null;
  12. OBX6txtv:cc.Tween=null
  13. OBX6txtv2:cc.Tween=null
  14. onLoad () {
  15. game_config_dyn.load(null)
  16. game_core.init(this.node,this.tileBlock)
  17. this.OBX6txtv2=cc.tween(this.node).delay(1).call(()=>{
  18. this.W1cIA6G()
  19. }).start()
  20. }
  21. // https://docs.cocos.com/creator/2.4/manual/zh/scripting/tween.html#%E6%94%AF%E6%8C%81%E7%BC%93%E5%8A%A8%E4%BB%BB%E6%84%8F%E5%AF%B9%E8%B1%A1%E7%9A%84%E4%BB%BB%E6%84%8F%E5%B1%9E%E6%80%A7
  22. // https://docs.cocos.com/creator/2.4/api/zh/classes/Easing.html#circout
  23. W1cIA6G()
  24. {
  25. this.OBX6txtv=cc.tween({progress:0}).to(2.85,{progress:100},{progress:(start:number, end:number, current:number, ratio:number)=>{
  26. if(cc.isValid(this.node))
  27. {
  28. this.wxOdV3NSqeDk2e2Prog.string=(ratio*100|0) +" %"
  29. }
  30. if(ratio>=0.9999999)
  31. {
  32. cc.director.loadScene(Vl2h6kBYov1uNSwzL7.u_53B7V)
  33. }
  34. },easing:"circInOut"}).start()
  35. }
  36. // update (dt) {}
  37. }