StartUpPanel.js 688 B

12345678910111213141516171819202122232425262728293031
  1. var StartUpPanel = cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. title:cc.Label,
  5. desLbl:cc.Label,
  6. costLbl:cc.Label,
  7. iconSp:cc.Sprite,
  8. cost:cc.Integer,
  9. },
  10. ShowPanel:function (data) {
  11. this.title.string = data.name;
  12. this.desLbl.string = "升级"+data.name+"****";
  13. //this.iconSp.spriteFrame = ;
  14. var cost = cc.Mgr.MapDataMgr.getUpgradeCostByTwoId(data.Id, data.subId, data.toLv);
  15. this.costLbl.string = cost;
  16. this.cost = cost;
  17. },
  18. ClosePanel:function(){
  19. this.node.active = false;
  20. },
  21. ClickUpgrade:function(){
  22. },
  23. });
  24. module.exports = StartUpPanel;