Skip to main content
Skip to main content

AnimationValueBool

AnimationValueBool

Description

Animation value with a boolean as type

Parent

AnimationValueFloat

Functions

init

Description

Definition

init()

Arguments

anyindex
anynumParts

Code

function AnimationValueBool:init(index, numParts)
end

load

Description

Definition

load()

Arguments

anyxmlFile
anykey

Code

function AnimationValueBool:load(xmlFile, key)
self.value = xmlFile:getValue(key .. "#" .. self.startName)

self.warningInfo = key
self.xmlFile = xmlFile

return self.value ~ = nil and self:extraLoad(xmlFile, key)
end

new

Description

Definition

new()

Arguments

anyvehicle
anyanimation
anypart
anystartName
anyendName
anyname
anyinitialUpdate
anyget
anyset
anyextraLoad
anycustomMt

Code

function AnimationValueBool.new(vehicle, animation, part, startName, endName, name, initialUpdate, get, set, extraLoad, customMt)
return AnimationValueFloat.new(vehicle, animation, part, startName, endName, name, initialUpdate, get, set, extraLoad, customMt or AnimationValueBool _mt)
end

postInit

Description

Definition

postInit()

Code

function AnimationValueBool:postInit()
end

reset

Description

Definition

reset()

Code

function AnimationValueBool:reset()
self.curValue = nil
end

update

Description

Definition

update()

Arguments

anydurationToEnd
anydtToUse
anyrealDt

Code

function AnimationValueBool:update(durationToEnd, dtToUse, realDt)
if self.curValue = = nil then
self.curValue = self:get()
end

if self.value ~ = self.curValue then
self.curValue = self.value
self:set( self.value)
return true
end

return false
end