improvement: make char switch instant

This commit is contained in:
Kazhnuz 2021-04-10 17:43:10 +02:00
parent 91c885e1fb
commit 16fa9f49eb

View file

@ -18,6 +18,7 @@ end
function Team:switchActiveCharacter()
if (self.canChangeActive) then
game.characters:setActiveCharacter()
self.active = game.characters:getActiveCharacterData()
self.canChangeActive = false
self.tweens:newTimer(0.3, "changeCharacter")
self.tweens:newTween(0, 0.3, {activeVisible = self.activeVisible + 1}, "inQuad")
@ -27,7 +28,6 @@ end
function Team:endCharacterSwitchAnimation()
self.canChangeActive = true
self.activeVisible = game.characters.active
self.active = game.characters:getActiveCharacterData()
self:updateCurrentCharset()
end