diff --git a/content/chunk0/gameessentialbase.entity.patch.json b/content/chunk0/gameessentialbase.entity.patch.json index c4d8ea3..e53f6a0 100644 --- a/content/chunk0/gameessentialbase.entity.patch.json +++ b/content/chunk0/gameessentialbase.entity.patch.json @@ -214,6 +214,19 @@ "events": { "Data": { "SecondaryColours": ["cafef77f80f5f691"] } } } ] + }, + { + "AddEntity": [ + "cafe80cf93bca7cf", + { + "parent": "cafeba446945a84b", + "name": "GameEventListener", + "factory": "[modules:/zgameeventlistenerentity.class].pc_entitytype", + "blueprint": "[modules:/zgameeventlistenerentity.class].pc_entityblueprint", + "properties": { "m_eEvent": { "type": "EGameEventType", "value": "GET_SavegameRestored" } }, + "events": { "EventOccurred": { "GetData": ["cafea8f9b3707ba1", "cafe6e40d206cd7a"] } } + } + ] } ], "patchVersion": 6 diff --git a/content/chunk0/scaleform/001D0947392E2DD6.GFXF b/content/chunk0/scaleform/001D0947392E2DD6.GFXF index ad576e1..907d794 100644 Binary files a/content/chunk0/scaleform/001D0947392E2DD6.GFXF and b/content/chunk0/scaleform/001D0947392E2DD6.GFXF differ diff --git a/content/chunk0/scaleform/003F45DD25EEE393.UICB b/content/chunk0/scaleform/003F45DD25EEE393.UICB index f974f45..1b84a79 100644 Binary files a/content/chunk0/scaleform/003F45DD25EEE393.UICB and b/content/chunk0/scaleform/003F45DD25EEE393.UICB differ diff --git a/source/bin/HealthBar.swf b/source/bin/HealthBar.swf index 88dc352..d573053 100644 Binary files a/source/bin/HealthBar.swf and b/source/bin/HealthBar.swf differ diff --git a/source/src/healthbar/HealthBar.as b/source/src/healthbar/HealthBar.as index db234bb..c6e2d0b 100644 --- a/source/src/healthbar/HealthBar.as +++ b/source/src/healthbar/HealthBar.as @@ -13,6 +13,8 @@ public class HealthBar extends BaseControl { private var m_healthBarView:HealthBarView = new HealthBarView(); private var m_debugTextView:DebugTextView = new DebugTextView(); + private var m_healthBarColourTransform:ColorTransform = new ColorTransform(); + private var m_infectedColourTransform:ColorTransform = new ColorTransform(); private var m_currentHealth:Number; private var m_isInfected:Boolean = false; private var m_lowHealthColour:uint; @@ -104,11 +106,10 @@ public class HealthBar extends BaseControl { UpdateHealthBarColour(); } - private function UpdateHealthBarColour():void { + public function UpdateHealthBarColour():void { if (m_isInfected) { - var yellow:ColorTransform = new ColorTransform(); - yellow.color = m_infectedColour; - m_healthBarView.HealthBarInner.transform.colorTransform = yellow; + m_infectedColourTransform.color = m_infectedColour; + m_healthBarView.HealthBarInner.transform.colorTransform = m_infectedColourTransform; return; } @@ -131,9 +132,8 @@ public class HealthBar extends BaseControl { medium = interpolate(m_mediumHealthColour & 0xFF, m_fullHealthColour & 0xFF, middleToFullRatio); } - var colorTransform:ColorTransform = new ColorTransform(); - colorTransform.color = (low << 16) | (full << 8) | medium; - m_healthBarView.HealthBarInner.transform.colorTransform = colorTransform; + m_healthBarColourTransform.color = (low << 16) | (full << 8) | medium; + m_healthBarView.HealthBarInner.transform.colorTransform = m_healthBarColourTransform; } private function interpolate(start:uint, end:uint, ratio:Number):uint {