初级玩家
![Rank: 2](static/image/common/star_level2.gif)
- 贡献度
- 2
- 金元
- 891
- 积分
- 97
- 精华
- 0
- 注册时间
- 2009-4-25
|
local W = 64
local SEP = 12
local INTERSEP = 28
local y = 132/2+8
local num_intersep = math.floor(num_slots / 5) + 1
local total_w = (num_slots -26.35)*(W) + (num_slots -26.35 - 2 - num_intersep) *(SEP) + INTERSEP*num_intersep
for k, v in ipairs(self.equipslotinfo) do
local slot = EquipSlot(v.slot, v.atlas, v.image, self.owner)
self.equip[v.slot] = self:AddChild(slot)
local x = -total_w/2 + (num_slots*0+14.07)*(W)+num_intersep*(INTERSEP - SEP) + (num_slots-1)*SEP + INTERSEP + W*(k-1) + SEP*(k-1)
slot:SetPosition(x,y+180,0)
end
for k = 1,25 do
local slot = InvSlot(k, HUD_ATLAS, "inv_slot.tex", self.owner, self.owner.components.inventory)
self.inv[k] = self:AddChild(slot)
local interseps = math.floor((k-1) / 5)
local x = -total_w/2 + W/2 + interseps*(INTERSEP - SEP) + (k-1)*W + (k-1)*SEP
slot:SetPosition(x,y,0)
end
for k = 26,50 do
local slot = InvSlot(k, HUD_ATLAS, "inv_slot.tex", self.owner, self.owner.components.inventory)
self.inv[k] = self:AddChild(slot)
local interseps = math.floor((k-1-25) / 5)
local x = -total_w/2 + W/2 + interseps*(INTERSEP - SEP) + (k-1-25)*W + (k-1-25)*SEP
slot:SetPosition(x,y+71,0)
end
|
|