Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. function lowHpAnimation(self)
  2.  
  3.     local a = self:GetAlpha()
  4.     if self.anim_alpha_dest == nil then
  5.         self.anim_alpha_dest = "down"
  6.     end
  7.    
  8.     if a >= i_alpha and self.anim_alpha_dest == "up" then
  9.         self.anim_alpha_dest = "down"
  10.     end
  11.    
  12.     if a <= i_anim_alpha_lower and self.anim_alpha_dest == "down" then
  13.         self.anim_alpha_dest = "up"
  14.     end
  15.    
  16.     if self.anim_alpha_dest == "down" then
  17.         self:SetAlpha(a-i_anim_alpha_speed)
  18.     end
  19.     if self.anim_alpha_dest == "up" then
  20.         self:SetAlpha(a+i_anim_alpha_speed)
  21.         self:SetAlpha(a+i_anim_alpha_speed)
  22.     end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement