improvement: make char switch instant
This commit is contained in:
parent
91c885e1fb
commit
16fa9f49eb
1 changed files with 1 additions and 1 deletions
|
@ -18,6 +18,7 @@ end
|
||||||
function Team:switchActiveCharacter()
|
function Team:switchActiveCharacter()
|
||||||
if (self.canChangeActive) then
|
if (self.canChangeActive) then
|
||||||
game.characters:setActiveCharacter()
|
game.characters:setActiveCharacter()
|
||||||
|
self.active = game.characters:getActiveCharacterData()
|
||||||
self.canChangeActive = false
|
self.canChangeActive = false
|
||||||
self.tweens:newTimer(0.3, "changeCharacter")
|
self.tweens:newTimer(0.3, "changeCharacter")
|
||||||
self.tweens:newTween(0, 0.3, {activeVisible = self.activeVisible + 1}, "inQuad")
|
self.tweens:newTween(0, 0.3, {activeVisible = self.activeVisible + 1}, "inQuad")
|
||||||
|
@ -27,7 +28,6 @@ end
|
||||||
function Team:endCharacterSwitchAnimation()
|
function Team:endCharacterSwitchAnimation()
|
||||||
self.canChangeActive = true
|
self.canChangeActive = true
|
||||||
self.activeVisible = game.characters.active
|
self.activeVisible = game.characters.active
|
||||||
self.active = game.characters:getActiveCharacterData()
|
|
||||||
self:updateCurrentCharset()
|
self:updateCurrentCharset()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue