lua has more than 60 upvalues 解决办法

  • Post author:
  • Post category:其他


减少 如下CreateFightScene 下的 局部变量:

function CreateFightScene(data, parent, finCallback, bMonster)



local BLOOD_LEFT = 8



local BLOOD_BOTTOM = 12



local BG_JPG =”Fight/FightBg.jpg”



local BLOODBG_PNG = “Fight/BloodBg.png”



local BLOOD_PNG = “Fight/Blood.png”



local EBLOOD_PNG = “Fight/EBlood.png”



local SHOW_TIME = 0.5



local HP_LEFT = 270



local HP_BOTTOM = 25



local HEAD_LEFT = 67



local HEAD_BOTTOM = 120



local HEAD_WIDTH = 155



local BLOOD_ZORDER = 10



local HEAD_ZORDER = 11



local WJ_ZORDER = 12



local FIGHT_WJ_ZORDER = 2



local EWJ_SCALE = 0.8



local comboNames = {}



local comboCards = {}



local myName = a2u(data:ReadString()):c_str()



local enemyName = a2u(data:ReadString()):c_str()



local bHasCombo = false



for i = 0, 1 do



local tnum = data:ReadInt8()



print(“tnum ” .. i .. ” ” .. tnum)



版权声明:本文为zhangshu88原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。