zombiesurvival-evolved/gamemodes/zombiesurvival/entities/effects/explosion_shadeshield.lua

31 lines
772 B
Lua
Raw Normal View History

function EFFECT:Init(effectdata)
local pos = effectdata:GetOrigin()
local normal = effectdata:GetNormal()
local emitter = ParticleEmitter(pos)
emitter:SetNearClip(24, 32)
for i=1, 50 do
local particle = emitter:Add("sprites/glow04_noz", pos)
particle:SetDieTime(1)
particle:SetColor(50,90,255)
particle:SetStartAlpha(255)
particle:SetEndAlpha(0)
particle:SetStartSize(4)
particle:SetEndSize(11)
particle:SetVelocity((normal + VectorRand()):GetNormal() * 150)
particle:SetGravity(VectorRand() * 20 + Vector(0, 0, -400))
particle:SetCollide(true)
particle:SetBounce(0.75)
particle:SetAirResistance(12)
end
emitter:Finish() emitter = nil collectgarbage("step", 64)
end
function EFFECT:Think()
return false
end
function EFFECT:Render()
end