3c877c8f-8ef6-4543-9246-a2f90fe634cf.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. "use strict";
  2. cc._RF.push(module, '3c877yPjvZFQ5JGovkP5jTP', 'Table');
  3. // Script/Table.ts
  4. "use strict";
  5. var __extends = (this && this.__extends) || (function () {
  6. var extendStatics = function (d, b) {
  7. extendStatics = Object.setPrototypeOf ||
  8. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  9. function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
  10. return extendStatics(d, b);
  11. };
  12. return function (d, b) {
  13. extendStatics(d, b);
  14. function __() { this.constructor = d; }
  15. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  16. };
  17. })();
  18. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  19. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  20. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  21. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  22. return c > 3 && r && Object.defineProperty(target, key, r), r;
  23. };
  24. Object.defineProperty(exports, "__esModule", { value: true });
  25. var Beef_1 = require("./Beef");
  26. var gameScene_1 = require("./gameScene");
  27. var guidePanel_1 = require("./guide/guidePanel");
  28. var App_1 = require("./Manager/App");
  29. var Person_1 = require("./Person");
  30. var TipPanel_1 = require("./view/tipPanel/TipPanel");
  31. var TipPanelMediator_1 = require("./view/tipPanel/TipPanelMediator");
  32. var ATRewardedVideoJSSDK_1 = require("./AnyThinkAds/ATRewardedVideoJSSDK");
  33. var ATAndroidJS2_1 = require("./ATAndroidJS2");
  34. var GlobalManager_1 = require("./GlobalManager");
  35. var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
  36. var Table = /** @class */ (function (_super) {
  37. __extends(Table, _super);
  38. function Table() {
  39. var _this = _super !== null && _super.apply(this, arguments) || this;
  40. // @property([cc.SpriteFrame])
  41. // private tableSpriteFrame: cc.SpriteFrame[] = [];
  42. _this.btnShengNiuPai = null;
  43. _this.rawSteakList = [null, null, null, null];
  44. _this.cookedSteakList = [null, null, null, null];
  45. _this.prefabBeef = null;
  46. _this.btnYellowSouce = null;
  47. _this.btnCocumber = null;
  48. _this.btnTomato = null;
  49. _this.btnRedSouce = null;
  50. _this.liuShui = null;
  51. _this.drinkCup = null;
  52. _this.kaoPanGaiZi = [];
  53. _this.plateGaiZi = [];
  54. _this.cupGaiZi = [];
  55. _this.pDrinkBar = null;
  56. _this.m_shuiLiuTime = 3;
  57. _this.fullCup = null;
  58. _this.drinkCupList = [];
  59. _this.kaoPanNum = 2;
  60. _this.plateNum = 2;
  61. _this.cupNum = 3;
  62. _this.beefBornPos = [cc.v3(-290, -185, 0), cc.v3(-197, -195, 0), cc.v3(-243, -131, 0), cc.v3(-160, -133, 0)];
  63. _this.platePos = [cc.v3(-58, -200, 0), cc.v3(80, -201, 0), cc.v3(-52, -126, 0), cc.v3(68, -131, 0)];
  64. _this.burntPos = cc.v3(-360, -640, 0);
  65. _this.cupPos = [cc.v3(258, -209, 0), cc.v3(232, -161, 0), cc.v3(205, -115, 0)];
  66. // ------------------------person---------------------------
  67. _this.renwuPerfabList = [];
  68. _this.personList = [];
  69. // 点餐位置
  70. _this.personPos = [cc.v3(30, 38, 0), cc.v3(260, 38, 0), cc.v3(-200, 38, 0)];
  71. // 人物出生位置
  72. _this.bornPos = [cc.v3(-500, 38, 0), cc.v3(550, 38, 0)];
  73. _this.fixTime = 1;
  74. _this.passTime = 0;
  75. _this.personWalkTime = 2;
  76. _this.createpPersonNum = 0; //已经来了到少人
  77. _this.fullPersonNum = 0; //多少吃饱了
  78. _this.maxSitPersonNum = 3; //总共只能坐下人数
  79. _this.kaoJiaoCount = 0; //合计烤焦了多少个?
  80. return _this;
  81. }
  82. Table_1 = Table;
  83. // LIFE-CYCLE CALLBACKS:
  84. Table.getInstance = function () {
  85. if (this._instance == null) {
  86. this._instance = new Table_1();
  87. }
  88. return this._instance;
  89. };
  90. Table.prototype.onLoad = function () {
  91. Table_1._instance = this;
  92. this.btnShengNiuPai.node.on(cc.Node.EventType.TOUCH_END, this.onClickShengNiuPai.bind(this), this);
  93. this.btnYellowSouce.node.on(cc.Node.EventType.TOUCH_END, this.onClickYellowSouce.bind(this), this);
  94. this.btnCocumber.node.on(cc.Node.EventType.TOUCH_END, this.onClickCocumber.bind(this), this);
  95. this.btnTomato.node.on(cc.Node.EventType.TOUCH_END, this.onClickTomato.bind(this), this);
  96. this.btnRedSouce.node.on(cc.Node.EventType.TOUCH_END, this.onClickRedSouce.bind(this), this);
  97. // this.drinksMachine.node.on(cc.Node.EventType.TOUCH_END, this.onClickDrinksMachine.bind(this), this);
  98. for (var i = 0; i < this.maxSitPersonNum; i++) {
  99. this.personList[i] = null;
  100. }
  101. this.plateNum = App_1.App.DataManager.kitchenNum[0][App_1.App.DataManager.kinchenLevel[0]];
  102. this.kaoPanNum = App_1.App.DataManager.kitchenNum[1][App_1.App.DataManager.kinchenLevel[1]];
  103. this.cupNum = App_1.App.DataManager.kitchenNum[2][App_1.App.DataManager.kinchenLevel[2]];
  104. this.initAdForPage();
  105. };
  106. Table.prototype.initAdForPage = function () {
  107. if (cc.sys.os === cc.sys.OS_ANDROID) {
  108. var deviceId = ATAndroidJS2_1.default.getDeviceUserId();
  109. console.log("zh:checkstatus:", ATRewardedVideoJSSDK_1.default.checkAdStatus(ATAndroidJS2_1.default.getPlacementId()));
  110. var setting = {};
  111. setting[ATRewardedVideoJSSDK_1.default.userIdKey] = deviceId;
  112. ATRewardedVideoJSSDK_1.default.loadRewardedVideo(ATAndroidJS2_1.default.getPlacementId(), setting);
  113. }
  114. };
  115. Table.prototype.start = function () {
  116. for (var i = 0; i < this.kaoPanNum - 2; i++) {
  117. this.kaoPanGaiZi[i].active = false;
  118. }
  119. for (var i = 0; i < this.plateNum - 2; i++) {
  120. this.plateGaiZi[i].active = true;
  121. }
  122. for (var i = 0; i < this.cupNum - 1; i++) {
  123. this.cupGaiZi[i].active = true;
  124. }
  125. if (App_1.App.DataManager.CurrentIntoLevel >= 3) {
  126. this.btnTomato.node.active = true;
  127. }
  128. if (App_1.App.DataManager.CurrentIntoLevel >= 5) {
  129. this.btnYellowSouce.node.active = true;
  130. }
  131. if (App_1.App.DataManager.CurrentIntoLevel >= 7) {
  132. this.btnRedSouce.node.active = true;
  133. }
  134. this.onClickDrinksMachine();
  135. if (App_1.App.DataManager.guideStep == 0) {
  136. guidePanel_1.default.getInstance().showCurGuide();
  137. }
  138. };
  139. Table.prototype.onClickShengNiuPai = function () {
  140. if (App_1.App.DataManager.guideStep == 0) {
  141. App_1.App.DataManager.guideStep++;
  142. App_1.App.LocalStorageUtil.setNumber(App_1.App.LocalStorageUtil.str_guideStep, App_1.App.DataManager.guideStep);
  143. guidePanel_1.default.getInstance().hideGuideStep();
  144. }
  145. for (var i = 0; i < this.kaoPanNum; i++) {
  146. if (this.rawSteakList[i] == null) {
  147. var beef = cc.instantiate(this.prefabBeef);
  148. beef.on(cc.Node.EventType.TOUCH_END, this.onClickRawBeef.bind(this, i), beef);
  149. beef.setPosition(this.beefBornPos[i]);
  150. this.node.addChild(beef);
  151. this.rawSteakList[i] = beef;
  152. break;
  153. }
  154. }
  155. };
  156. Table.prototype.onClickRawBeef = function (index) {
  157. console.log('zh: 已经烤焦=' + this.kaoJiaoCount);
  158. if (this.rawSteakList[index].getComponent(Beef_1.default).m_state == Beef_1.BeefState.Burnt) {
  159. console.log('zh: 已经烤焦了');
  160. var c1 = this.kaoJiaoCount + 1;
  161. this.kaoJiaoCount = c1;
  162. // 每烤焦2次执行惩罚
  163. if (c1 % 2 === 0) { // 当烤焦次数为2的倍数时执行惩罚
  164. this.kaoJiaoCount = 0; // 重置计数器
  165. console.log('zh: 需要惩罚');
  166. if (cc.sys.os == cc.sys.OS_ANDROID) {
  167. if (ATRewardedVideoJSSDK_1.default.hasAdReady(ATAndroidJS2_1.default.getPlacementId())) {
  168. console.log('zh:AD ok!');
  169. cc.director.pause();
  170. console.log('zh: 游戏已暂停');
  171. cc.sys.localStorage.setItem('yxAdMark', 'callBackFor_kaoJiao'); //看广告用于 xx 标记
  172. cc.sys.localStorage.setItem('yxAdMark_index', index); //参数
  173. GlobalManager_1.default.instance.registerMethod('callBackFor_kaoJiao', this.callBackFor_kaoJiao.bind(this));
  174. ATRewardedVideoJSSDK_1.default.showAd(ATAndroidJS2_1.default.getPlacementId());
  175. }
  176. else {
  177. console.log('zh:AD NO OK');
  178. this.callBackFor_kaoJiao(index);
  179. this.initAdForPage();
  180. return;
  181. }
  182. }
  183. else {
  184. console.log('zh: H5 直接奖励');
  185. this.callBackFor_kaoJiao(index);
  186. return;
  187. }
  188. }
  189. else {
  190. this.callBackFor_kaoJiao(index);
  191. return;
  192. }
  193. // App.Facade.popView(TipPanelMediator, TipPanel, "The steak is burnt!", false);
  194. // cc.tween(this.rawSteakList[index]).to(0.5, {position: this.burntPos}).removeSelf().start()
  195. // this.rawSteakList[index] = null;
  196. return;
  197. }
  198. else if (this.rawSteakList[index].getComponent(Beef_1.default).m_state == Beef_1.BeefState.Cooked) {
  199. for (var i = 0; i < this.plateNum; i++) {
  200. if (!this.cookedSteakList[i]) {
  201. this.rawSteakList[index].targetOff(this.rawSteakList[index]);
  202. // this.rawSteakList[index].off(cc.Node.EventType.TOUCH_END, this.onClickRawBeef.bind(this, index), this);
  203. this.cookedSteakList[i] = this.rawSteakList[index];
  204. this.rawSteakList[index] = null;
  205. // 从烤架移动到盘子里面
  206. this.cookedSteakList[i].getComponent(Beef_1.default).setState(Beef_1.BeefState.Plate);
  207. this.cookedSteakList[i].on(cc.Node.EventType.TOUCH_END, this.onClickCookedBeef.bind(this, i), this);
  208. cc.tween(this.cookedSteakList[i]).to(0.5, { position: this.platePos[i] }).start();
  209. break;
  210. }
  211. }
  212. if (App_1.App.DataManager.guideStep == 1) {
  213. App_1.App.DataManager.guideStep++;
  214. App_1.App.LocalStorageUtil.setNumber(App_1.App.LocalStorageUtil.str_guideStep, App_1.App.DataManager.guideStep);
  215. guidePanel_1.default.getInstance().showCurGuide();
  216. }
  217. }
  218. };
  219. //烤焦了惩罚
  220. Table.prototype.callBackFor_kaoJiao = function (index) {
  221. cc.director.resume();
  222. console.log('zh: 游戏已恢复');
  223. console.log('zh:callBackFor_kaoJiao 被触发 index = ' + index);
  224. App_1.App.Facade.popView(TipPanelMediator_1.default, TipPanel_1.default, "The steak is burnt!", false);
  225. cc.tween(this.rawSteakList[index]).to(0.5, { position: this.burntPos }).removeSelf().start();
  226. this.rawSteakList[index] = null;
  227. return;
  228. };
  229. // 点击熟牛排
  230. Table.prototype.onClickCookedBeef = function (index) {
  231. if (App_1.App.DataManager.guideStep == 3) {
  232. App_1.App.DataManager.guideStep++;
  233. App_1.App.LocalStorageUtil.setNumber(App_1.App.LocalStorageUtil.str_guideStep, App_1.App.DataManager.guideStep);
  234. guidePanel_1.default.getInstance().showCurGuide();
  235. }
  236. // todo 移动到人
  237. // 移动到人之后,从数组里面删除
  238. var toPos = this.findFoodPos(this.cookedSteakList[index].getComponent(Beef_1.default).m_foodType);
  239. if (toPos) {
  240. var pos = this.node.convertToNodeSpaceAR(toPos);
  241. cc.tween(this.cookedSteakList[index]).to(0.5, { position: pos, scale: 0.5 }).removeSelf().start();
  242. this.cookedSteakList[index] = null;
  243. }
  244. };
  245. Table.prototype.onClickYellowSouce = function () {
  246. for (var i = 0; i < this.cookedSteakList.length; i++) {
  247. if (this.cookedSteakList[i] && this.cookedSteakList[i].getComponent(Beef_1.default).m_state == Beef_1.BeefState.Cocumber) {
  248. this.cookedSteakList[i].getComponent(Beef_1.default).setState(Beef_1.BeefState.YellowSouce);
  249. break;
  250. }
  251. }
  252. };
  253. Table.prototype.onClickCocumber = function () {
  254. if (App_1.App.DataManager.guideStep == 2) {
  255. App_1.App.DataManager.guideStep++;
  256. App_1.App.LocalStorageUtil.setNumber(App_1.App.LocalStorageUtil.str_guideStep, App_1.App.DataManager.guideStep);
  257. guidePanel_1.default.getInstance().showCurGuide();
  258. }
  259. for (var i = 0; i < this.cookedSteakList.length; i++) {
  260. if (this.cookedSteakList[i] && this.cookedSteakList[i].getComponent(Beef_1.default).m_state == Beef_1.BeefState.Plate) {
  261. this.cookedSteakList[i].getComponent(Beef_1.default).setState(Beef_1.BeefState.Cocumber);
  262. break;
  263. }
  264. }
  265. };
  266. Table.prototype.onClickTomato = function () {
  267. for (var i = 0; i < this.cookedSteakList.length; i++) {
  268. if (this.cookedSteakList[i] && this.cookedSteakList[i].getComponent(Beef_1.default).m_state == Beef_1.BeefState.Plate) {
  269. this.cookedSteakList[i].getComponent(Beef_1.default).setState(Beef_1.BeefState.Tomato);
  270. break;
  271. }
  272. }
  273. };
  274. Table.prototype.onClickRedSouce = function () {
  275. for (var i = 0; i < this.cookedSteakList.length; i++) {
  276. if (this.cookedSteakList[i] && this.cookedSteakList[i].getComponent(Beef_1.default).m_state == Beef_1.BeefState.Tomato) {
  277. this.cookedSteakList[i].getComponent(Beef_1.default).setState(Beef_1.BeefState.RedSouce);
  278. break;
  279. }
  280. }
  281. };
  282. Table.prototype.onClickDrinksMachine = function () {
  283. var _this = this;
  284. this.pDrinkBar.node.active = true;
  285. this.liuShui.active = true;
  286. App_1.App.SpinManager.PlaySpinAnimation(this.liuShui, "newAnimation", true, null);
  287. App_1.App.SpinManager.PlaySpinAnimation(this.drinkCup, "newAnimation", false, null);
  288. this.pDrinkBar.progress = 0;
  289. cc.tween(this.pDrinkBar).to(this.m_shuiLiuTime, { progress: 1 }).call(function () {
  290. _this.pDrinkBar.node.active = false;
  291. _this.liuShui.active = false;
  292. _this.drinkCup.getComponent(sp.Skeleton).animation = null;
  293. for (var i = 0; i < _this.cupNum; i++) {
  294. if (!_this.drinkCupList[i]) {
  295. var cup = cc.instantiate(_this.fullCup);
  296. cup.setPosition(_this.drinkCup.getPosition());
  297. _this.node.addChild(cup);
  298. cup.zIndex = _this.cupNum - i;
  299. _this.drinkCupList[i] = cup;
  300. cup.on(cc.Node.EventType.TOUCH_END, _this.onClickFullCup.bind(_this, i), _this);
  301. if (i == 0) {
  302. cc.tween(cup).to(0.5, { position: _this.cupPos[0] }).start();
  303. }
  304. else {
  305. cc.tween(cup).to(0.5, { position: _this.cupPos[0] }).to(0.2, { position: _this.cupPos[i] }).start();
  306. }
  307. }
  308. }
  309. }).start();
  310. };
  311. // 点击饮料
  312. Table.prototype.onClickFullCup = function (index) {
  313. // todo 移动到人
  314. if (App_1.App.DataManager.guideStep == 4) {
  315. App_1.App.DataManager.guideStep++;
  316. App_1.App.LocalStorageUtil.setNumber(App_1.App.LocalStorageUtil.str_guideStep, App_1.App.DataManager.guideStep);
  317. guidePanel_1.default.getInstance().hideGuideStep();
  318. }
  319. // 移动到人之后,从数组里面删除
  320. var toPos = this.findFoodPos(Beef_1.FoodType.Drink);
  321. if (toPos) {
  322. var pos = this.node.convertToNodeSpaceAR(toPos);
  323. cc.tween(this.drinkCupList[index]).to(0.3, { position: pos, scale: 0.5 }).removeSelf().start();
  324. this.drinkCupList[index] = null;
  325. // this.m_machineState = DrinksMachineState.None;
  326. this.onClickDrinksMachine();
  327. }
  328. };
  329. Table.prototype.onDisable = function () {
  330. this.btnShengNiuPai.node.off(cc.Node.EventType.TOUCH_END, this.onClickShengNiuPai.bind(this), this);
  331. this.btnYellowSouce.node.off(cc.Node.EventType.TOUCH_END, this.onClickYellowSouce.bind(this), this);
  332. this.btnCocumber.node.off(cc.Node.EventType.TOUCH_END, this.onClickCocumber.bind(this), this);
  333. this.btnTomato.node.off(cc.Node.EventType.TOUCH_END, this.onClickTomato.bind(this), this);
  334. this.btnRedSouce.node.off(cc.Node.EventType.TOUCH_END, this.onClickRedSouce.bind(this), this);
  335. };
  336. // 找到点这个食物剩余时间最少的人
  337. Table.prototype.findFoodPos = function (foodt) {
  338. var curPerson = null;
  339. var personIndex = -1;
  340. var lessLeftTime = 100;
  341. for (var i = 0; i < this.maxSitPersonNum; i++) {
  342. if (this.personList[i] && this.personList[i].getComponent(Person_1.default).m_state == Person_1.PersonState.Waite) {
  343. // 点餐种类
  344. var fTypelist = this.personList[i].getComponent(Person_1.default).foodTypeList;
  345. var time = this.personList[i].getComponent(Person_1.default).leftTime;
  346. for (var j = 0; j < fTypelist.length; j++) {
  347. if (foodt == fTypelist[j] && lessLeftTime > time) {
  348. lessLeftTime = time;
  349. personIndex = i;
  350. curPerson = this.personList[i];
  351. }
  352. }
  353. }
  354. }
  355. if (curPerson) {
  356. var worldPos = curPerson.getComponent(Person_1.default).getFoodWorldPos(foodt);
  357. if (curPerson.getComponent(Person_1.default).judgeFoodFull()) {
  358. this.fullPersonNum++;
  359. var smallLevel = App_1.App.DataManager.PassProgress[App_1.App.DataManager.CurrentIntoLevel];
  360. if (this.fullPersonNum == App_1.App.DataManager.personCount[App_1.App.DataManager.CurrentIntoLevel - 1][smallLevel - 1]) {
  361. // GameSuccess
  362. this.personList[personIndex] = null;
  363. var rand_1 = Math.round(Math.random());
  364. cc.tween(curPerson).delay(0.6).call(function () {
  365. curPerson.getComponent(Person_1.default).setState(Person_1.PersonState.FullOut);
  366. if (rand_1 == 1) {
  367. curPerson.getChildByName("renwu").scaleX = -0.5;
  368. }
  369. }).to(this.personWalkTime, { position: this.bornPos[rand_1] }).call(function () {
  370. curPerson.removeFromParent();
  371. }).start();
  372. gameScene_1.default.instance.GameSuccess();
  373. }
  374. else {
  375. var rand_2 = Math.round(Math.random());
  376. this.personList[personIndex] = null;
  377. cc.tween(curPerson).delay(0.6).call(function () {
  378. curPerson.getComponent(Person_1.default).setState(Person_1.PersonState.FullOut);
  379. if (rand_2 == 1) {
  380. curPerson.getChildByName("renwu").scaleX = -0.5;
  381. }
  382. }).to(this.personWalkTime, { position: this.bornPos[rand_2] }).call(function () {
  383. curPerson.removeFromParent();
  384. }).start();
  385. }
  386. }
  387. return worldPos;
  388. }
  389. return null;
  390. };
  391. Table.prototype.update = function (dt) {
  392. if (!gameScene_1.default.instance.GameStutas)
  393. return;
  394. this.passTime += dt;
  395. var smallLevel = App_1.App.DataManager.PassProgress[App_1.App.DataManager.CurrentIntoLevel];
  396. if (this.passTime >= this.fixTime && this.createpPersonNum < App_1.App.DataManager.personCount[App_1.App.DataManager.CurrentIntoLevel - 1][smallLevel - 1]) {
  397. this.passTime = 0;
  398. this.fixTime = 1;
  399. console.log("aaa-------randomIndex---------", smallLevel);
  400. var _loop_1 = function (i) {
  401. if (!this_1.personList[i]) {
  402. var randomIndex = Math.floor(Math.random() * this_1.renwuPerfabList.length);
  403. var person_1 = cc.instantiate(this_1.renwuPerfabList[randomIndex]);
  404. person_1.getComponent(Person_1.default).setState(Person_1.PersonState.Comming);
  405. person_1.zIndex = -1;
  406. this_1.node.addChild(person_1);
  407. this_1.personList[i] = person_1;
  408. var rand = Math.round(Math.random());
  409. person_1.setPosition(this_1.bornPos[rand]);
  410. if (rand == 0) {
  411. person_1.getChildByName("renwu").scaleX = -0.5;
  412. }
  413. App_1.App.SpinManager.PlaySpinAnimation(person_1.getChildByName("renwu"), "newAnimation", true);
  414. cc.tween(person_1).to(this_1.personWalkTime, { position: this_1.personPos[i] }).call(function () {
  415. person_1.getChildByName("renwu").scaleX = 0.5;
  416. person_1.getComponent(Person_1.default).setState(Person_1.PersonState.Waite);
  417. }).start();
  418. this_1.createpPersonNum++;
  419. var smallLevel_1 = App_1.App.DataManager.PassProgress[App_1.App.DataManager.CurrentIntoLevel];
  420. gameScene_1.default.instance.updateLeftPeople(App_1.App.DataManager.personCount[App_1.App.DataManager.CurrentIntoLevel - 1][smallLevel_1 - 1] - this_1.createpPersonNum);
  421. return "break";
  422. }
  423. };
  424. var this_1 = this;
  425. for (var i = 0; i < this.maxSitPersonNum; i++) {
  426. var state_1 = _loop_1(i);
  427. if (state_1 === "break")
  428. break;
  429. }
  430. }
  431. };
  432. var Table_1;
  433. Table._instance = null;
  434. __decorate([
  435. property(cc.Button)
  436. ], Table.prototype, "btnShengNiuPai", void 0);
  437. __decorate([
  438. property(cc.Prefab)
  439. ], Table.prototype, "prefabBeef", void 0);
  440. __decorate([
  441. property(cc.Button)
  442. ], Table.prototype, "btnYellowSouce", void 0);
  443. __decorate([
  444. property(cc.Button)
  445. ], Table.prototype, "btnCocumber", void 0);
  446. __decorate([
  447. property(cc.Button)
  448. ], Table.prototype, "btnTomato", void 0);
  449. __decorate([
  450. property(cc.Button)
  451. ], Table.prototype, "btnRedSouce", void 0);
  452. __decorate([
  453. property(cc.Node)
  454. ], Table.prototype, "liuShui", void 0);
  455. __decorate([
  456. property(cc.Node)
  457. ], Table.prototype, "drinkCup", void 0);
  458. __decorate([
  459. property([cc.Node])
  460. ], Table.prototype, "kaoPanGaiZi", void 0);
  461. __decorate([
  462. property([cc.Node])
  463. ], Table.prototype, "plateGaiZi", void 0);
  464. __decorate([
  465. property([cc.Node])
  466. ], Table.prototype, "cupGaiZi", void 0);
  467. __decorate([
  468. property(cc.ProgressBar)
  469. ], Table.prototype, "pDrinkBar", void 0);
  470. __decorate([
  471. property(cc.Prefab)
  472. ], Table.prototype, "fullCup", void 0);
  473. __decorate([
  474. property([cc.Prefab])
  475. ], Table.prototype, "renwuPerfabList", void 0);
  476. Table = Table_1 = __decorate([
  477. ccclass
  478. ], Table);
  479. return Table;
  480. }(cc.Component));
  481. exports.default = Table;
  482. cc._RF.pop();