widgets/statusdisplays.lua
11121314151617
self.brain = self:AddChild(SanityBadge(owner))
--self.brain:SetPosition(0,35,0)
self.brain:SetPosition(0,-40,0)
self.brain:SetPercent(self.owner.components.sanity:GetPercent(), self.owner.components.health.maxhealth, self.owner.components.health:GetPenaltyPercent())
self.stomach = self:AddChild(HungerBadge(owner))
--self.stomach:SetPosition(-38,-32,0)
11121314151617
self.brain = self:AddChild(SanityBadge(owner))
--self.brain:SetPosition(0,35,0)
self.brain:SetPosition(0,-40,0)
self.brain:SetPercent(self.owner.components.sanity:GetPercent(), self.owner.components.sanity.max, self.owner.components.sanity:GetPenaltyPercent())
self.stomach = self:AddChild(HungerBadge(owner))
--self.stomach:SetPosition(-38,-32,0)
71727374757677
end
function StatusDisplays:SanityDelta(data)
self.brain:SetPercent(data.newpercent, self.owner.components.sanity.max)
if self.owner.components.sanity:IsCrazy() then
71727374757677
end
function StatusDisplays:SanityDelta(data)
self.brain:SetPercent(data.newpercent, self.owner.components.sanity.max, self.owner.components.sanity:GetPenaltyPercent())
if self.owner.components.sanity:IsCrazy() then