1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
-- Asset Dimensions
ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_FRAME_WIDTH = 256
ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_FRAME_HEIGHT = 128
ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_FRAME_WIDTH = 256
ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_FRAME_HEIGHT = 128
ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_WIDTH = 124
ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_HEIGHT = 18
ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_RIGHT_COORD = ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_WIDTH / 128
ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_BOTTOM_COORD = ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_HEIGHT / 32
ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_EDGE_WIDTH = 8
ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_EDGE_RIGHT_COORD = ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_EDGE_WIDTH / 16
ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_EDGE_BOTTOM_COORD = ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_HEIGHT / 32
ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_FULL_WIDTH = ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_WIDTH + ZO_HUD_KEYBOARD_DAEDRIC_ENERGY_METER_BAR_EDGE_WIDTH
ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_WIDTH = 128
ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_HEIGHT = 20
ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_RIGHT_COORD = ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_WIDTH / 128
ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_BOTTOM_COORD = ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_HEIGHT / 32
ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_EDGE_WIDTH = 11
ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_EDGE_RIGHT_COORD = ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_EDGE_WIDTH / 16
ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_EDGE_BOTTOM_COORD = ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_HEIGHT / 32
ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_FULL_WIDTH = ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_WIDTH + ZO_HUD_GAMEPAD_DAEDRIC_ENERGY_METER_BAR_EDGE_WIDTH
ZO_HUD_DAEDRIC_ENERGY_METER_LAYER_SIZE = 128
ZO_HUD_DAEDRIC_ENERGY_METER_HAMMER_SIZE = 128
ZO_HUD_DAEDRIC_ENERGY_METER_HAMMER_CELLS = 16
ZO_HUD_DAEDRIC_ENERGY_METER_HAMMER_RIGHT_COORD = ( ZO_HUD_DAEDRIC_ENERGY_METER_HAMMER_SIZE * ZO_HUD_DAEDRIC_ENERGY_METER_HAMMER_CELLS ) / 2048
-- End dimensions
local ENERGY_WARNING_THRESHOLD = . 2
---------------------------
-- Base Weapon Animation --
---------------------------
return object
end
-- Override me
end
-- Override me
end
-- Override me
end
-- Override me
end
-- Override me
end
-- Override me
end
---------------------------
-- No Weapon Animation --
---------------------------
end
----------------
-- Volendrung --
----------------
local ZO_HUDDaedricEnergyMeter_VolendrungAnimation = ZO_HUDDaedricEnergyMeter_BaseAnimation : Subclass ( )
end
-- Idle
self . hammerIdleLoop = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_HUDDaedricEnergyMeter_HammerIdle" , self . hammerIdleTexture )
-- Burst
self . hammerGlowRotateAnim = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_HUDDaedricEnergyMeter_RotateOnce" , weaponControl : GetNamedChild ( "Glow" ) )
self . hammerGlowFadeAnim = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_HUDDaedricEnergyMeter_Fade" , weaponControl : GetNamedChild ( "Glow" ) )
self . hammerBurstFadeAnim = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_HUDDaedricEnergyMeter_Fade" , weaponControl : GetNamedChild ( "Burst1" ) )
-- Ultimate used
self . hammerUltimateFadeAnim = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_HUDDaedricEnergyMeter_Fade" , weaponControl : GetNamedChild ( "Burst2" ) )
end
end
end
end
end
end
end
function ZO_HUDDaedricEnergyMeter_VolendrungAnimation : OnEnergyValueChanged ( currentEnergy , maxEnergy )
if maxEnergy == 0 then
return
end
local normalizedEnergy = currentEnergy / maxEnergy
-- after hitting warning threshold, hide idle animation and show the empty texture underneath
end
--------------------------
-- Daedric Energy Meter --
--------------------------
return object
end
-- Initialize state
-- Set up controls
self . warningLoop = ANIMATION_MANAGER : CreateTimelineFromVirtual ( "ZO_HUDDaedricEnergyMeter_Warn" , control : GetNamedChild ( "Overlay" ) )
-- Weapon animations
internalassert ( DAEDRIC_ARTIFACT_VISUAL_TYPE_MAX_VALUE == 1 , "Make new weapon animation for visual type" )
{
[ DAEDRIC_ARTIFACT_VISUAL_TYPE_VOLENDRUNG ] = ZO_HUDDaedricEnergyMeter_VolendrungAnimation : New ( control : GetNamedChild ( "WeaponVolendrung" ) ) ,
}
-- Set up platform styles
local ARROW_OFFSET_Y = 1
local ARROW_END_X_PADDING = 3
local ARROW_TEXTURE_WIDTH = 16
{
template = "ZO_HUDDaedricEnergyMeter_KeyboardTemplate" ,
arrowTemplate = "ZO_ArrowRegeneration_Keyboard_Template" ,
-- animate from right to left
end ,
}
{
template = "ZO_HUDDaedricEnergyMeter_GamepadTemplate" ,
arrowTemplate = "ZO_ArrowRegeneration_Gamepad_Template" ,
-- animate from left to right
end ,
}
end
end
self . platformStyle = ZO_PlatformStyle : New ( ApplyPlatformStyle , self . keyboardStyle , self . gamepadStyle )
-- Events
end
control : AddFilterForEvent ( EVENT_POWER_UPDATE , REGISTER_FILTER_POWER_TYPE , COMBAT_MECHANIC_FLAGS_DAEDRIC )
end
end
end
-- Do our initial update
end
local SHOULD_FADE_OUT = true
self : SetHiddenForReason ( "daedricArtifactInactive" , GetLocalPlayerDaedricArtifactId ( ) == nil , SHOULD_FADE_OUT )
end
do
-- values match player attribute bars
local SHOW_FADE_DELAY_MS = 0
local SHOW_FADE_DURATION_MS = 500
local HIDE_FADE_DELAY_MS = 1500
local HIDE_FADE_DURATION_MS = 500
if shouldFadeOut then
self . barFadeAnim : FadeOut ( HIDE_FADE_DELAY_MS , HIDE_FADE_DURATION_MS , ZO_ALPHA_ANIMATION_OPTION_USE_CURRENT_ALPHA , function ( )
end , ZO_ALPHA_ANIMATION_OPTION_USE_CURRENT_SHOWN )
else
end
else
self . barFadeAnim : FadeIn ( SHOW_FADE_DELAY_MS , SHOW_FADE_DURATION_MS , ZO_ALPHA_ANIMATION_OPTION_USE_CURRENT_ALPHA )
end
end
end
local HIDDEN = true
end
-- set active weapon
-- set initial values
local INSTANT = true
if actionSlotIndex == ACTION_BAR_ULTIMATE_SLOT_INDEX + 1 then
end
end )
local NOT_HIDDEN = false
end
end
if instant then
return
end
if currentEnergy > oldCurrentEnergy then
end
end
-- Warning animation
local shouldActivateWarning = ( maxEnergy == 0 or ( currentEnergy / maxEnergy ) < ENERGY_WARNING_THRESHOLD )
-- stop gracefully
end
end
end |