SubHallManger.js 874 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. },
  5. ctor: function () {
  6. },
  7. onLoad () {
  8. },
  9. start () {
  10. },
  11. onDestroy()
  12. {
  13. },
  14. playShow()
  15. {
  16. this.node.active = true
  17. var actionTo = cc.moveBy(0.3, cc.v2(-1226, 0));
  18. var actionTo1 = cc.moveBy(0.3, cc.v2(103, 0));
  19. this.gamesNode.runAction(actionTo)
  20. this.plane.runAction(actionTo1)
  21. },
  22. playEnd(target)
  23. {
  24. var finished = cc.callFunc(function() {
  25. this.node.active = false;
  26. if (target) {
  27. target.show()
  28. }
  29. }, this, null);
  30. var actionTo = cc.sequence(cc.moveBy(0.3, cc.v2(1226, 0)),finished);
  31. var actionTo1 = cc.moveBy(0.3, cc.v2(-103, 0));
  32. this.gamesNode.runAction(actionTo)
  33. this.plane.runAction(actionTo1)
  34. }
  35. });