add sborka
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
if SERVER then return end
|
||||
|
||||
function We(x)
|
||||
return x / 1920 * ScrW()
|
||||
end
|
||||
|
||||
function He(y)
|
||||
return y / 1080 * ScrH()
|
||||
end
|
||||
|
||||
local function CreateFonts()
|
||||
surface.CreateFont("MuR_FontDef", {
|
||||
font = "VK Sans Display DemiBold",
|
||||
extended = true,
|
||||
size = He(12),
|
||||
antialias = true
|
||||
})
|
||||
|
||||
surface.CreateFont("MuR_Font0", {
|
||||
font = "VK Sans Display DemiBold",
|
||||
extended = true,
|
||||
size = He(12),
|
||||
antialias = true
|
||||
})
|
||||
|
||||
surface.CreateFont("MuR_Font1", {
|
||||
font = "VK Sans Display DemiBold",
|
||||
extended = true,
|
||||
size = He(16),
|
||||
antialias = true
|
||||
})
|
||||
|
||||
surface.CreateFont("MuR_Font2", {
|
||||
font = "VK Sans Display DemiBold",
|
||||
extended = true,
|
||||
size = He(24),
|
||||
antialias = true
|
||||
})
|
||||
|
||||
surface.CreateFont("MuR_Font3", {
|
||||
font = "VK Sans Display DemiBold",
|
||||
extended = true,
|
||||
size = He(32),
|
||||
antialias = true
|
||||
})
|
||||
|
||||
surface.CreateFont("MuR_Font4", {
|
||||
font = "VK Sans Display DemiBold",
|
||||
extended = true,
|
||||
size = He(40),
|
||||
antialias = true
|
||||
})
|
||||
|
||||
surface.CreateFont("MuR_Font5", {
|
||||
font = "VK Sans Display DemiBold",
|
||||
extended = true,
|
||||
size = He(48),
|
||||
antialias = true
|
||||
})
|
||||
|
||||
surface.CreateFont("MuR_Font6", {
|
||||
font = "VK Sans Display DemiBold",
|
||||
extended = true,
|
||||
size = He(56),
|
||||
antialias = true
|
||||
})
|
||||
end
|
||||
|
||||
CreateFonts()
|
||||
hook.Add("OnScreenSizeChanged", "MuR_Drone_Fonts", function()
|
||||
CreateFonts()
|
||||
end)
|
||||
49
garrysmod/addons/ft_drones/lua/autorun/mur_drone_fx.lua
Normal file
49
garrysmod/addons/ft_drones/lua/autorun/mur_drone_fx.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
if CLIENT then
|
||||
|
||||
function DrawHeavySignalNoise(strength)
|
||||
if not strength then return end
|
||||
if strength > 0.9 then return end
|
||||
|
||||
local sw, sh = ScrW(), ScrH()
|
||||
|
||||
local noiseCount = (1 - strength) * 400
|
||||
for i = 1, noiseCount do
|
||||
surface.SetDrawColor(255, 255, 255, math.random(10, 60))
|
||||
surface.DrawRect(math.random(0, sw), math.random(0, sh), 1, 1)
|
||||
end
|
||||
|
||||
local lineCount = (1 - strength) * 60
|
||||
for i = 1, lineCount do
|
||||
local y = math.random(0, sh)
|
||||
local w = math.random(sw * 0.2, sw)
|
||||
local x = math.random(0, sw - w)
|
||||
surface.SetDrawColor(255, 255, 255, math.random(20, 80))
|
||||
surface.DrawRect(x, y, w, math.random(1, 3))
|
||||
end
|
||||
|
||||
if strength < 0.4 then
|
||||
local shift = math.random(-8, 8) * (1 - strength)
|
||||
surface.SetDrawColor(255, 255, 255, 40)
|
||||
surface.DrawRect(shift, 0, sw, sh)
|
||||
end
|
||||
|
||||
if strength < 0.3 then
|
||||
for i = 1, 10 do
|
||||
local x = math.random(0, sw)
|
||||
surface.SetDrawColor(255, 255, 255, math.random(30, 80))
|
||||
surface.DrawRect(x, 0, math.random(2, 6), sh)
|
||||
end
|
||||
end
|
||||
|
||||
if strength < 0.2 then
|
||||
local shake = (0.2 - strength) * 6
|
||||
surface.SetDrawColor(255, 255, 255, 25)
|
||||
surface.DrawRect(
|
||||
math.random(-shake, shake),
|
||||
math.random(-shake, shake),
|
||||
sw, sh
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user