还原测试代码
This commit is contained in:
parent
e7c01c9c5d
commit
de5d0e34e5
@ -46,7 +46,7 @@ function BattleControllerStage:_stageGenerateNextMonster()
|
||||
monsterComp:initWithEntity(modelId, unitEntity, self)
|
||||
self.defTeam:addUnit(monsterComp, true)
|
||||
self.battleUI:refreshDefHp(unitEntity:getHp(), unitEntity:getHpPercent())
|
||||
if not isBoss then -- 如果是boss就跑过去
|
||||
if isBoss then -- 如果是boss就跑过去
|
||||
local count = 0
|
||||
local function onFinish()
|
||||
count = count + 1
|
||||
|
||||
@ -9,6 +9,10 @@ local DEFAULT_X = 10000
|
||||
local BOARD_POS_UP = BF.Vector2(0, 47)
|
||||
local BOARD_POS_DOWN = BF.Vector2(0, -740)
|
||||
local BG_PATH = "assets/arts/textures/background/battle/%s.png"
|
||||
local CacheVector2 = {
|
||||
x = 0,
|
||||
y = 0
|
||||
}
|
||||
|
||||
function BattleUI:getPrefabPath()
|
||||
return "assets/prefabs/ui/battle/battle_ui.prefab"
|
||||
@ -78,7 +82,10 @@ function BattleUI:moveBattlefield(time)
|
||||
self.bgMoveTween:SetIntId(GConst.DOTWEEN_IDS.BATTLE)
|
||||
self.bgMoveTween:SetAutoKill(false)
|
||||
else
|
||||
self.bgMoveTween:ChangeEndValue(width*3/4, time, true)
|
||||
local x, y = self.bg:fastGetAnchoredPosition()
|
||||
CacheVector2.x = width*3/4
|
||||
CacheVector2.y = y
|
||||
self.bgMoveTween:ChangeEndValue(CacheVector2, time, true)
|
||||
self.bgMoveTween:Restart()
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user