освещение, уведомления
This commit is contained in:
1 parent
15c64d9eb2
commit
bea9df1ab8
8 files changed
+238
-48
No files matched your search
@@ -297,8 +297,8 @@ local function notify(msg, color)
|
||||
items[1]:Destroy()
|
||||
end
|
||||
local t, l = softPlate(
|
||||
{ Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts },
|
||||
{ TextSize = 30, TextColor3 = color or C.text, Text = msg }
|
||||
{ Size = UDim2.new(0, 0, 0, 44), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts },
|
||||
{ TextSize = 24, TextColor3 = color or C.text, Text = msg }
|
||||
)
|
||||
popIn(t)
|
||||
t:SetAttribute("Msg", msg)
|
||||
@@ -331,6 +331,17 @@ local catchInfo = text({ Size = UDim2.new(1, -160, 0, 20), Position = UDim2.from
|
||||
local catchValue = text({ Size = UDim2.new(1, -160, 0, 26), Position = UDim2.fromOffset(152, 90), Font = TITLE, TextSize = 21, TextColor3 = C.gold, Text = "", Parent = catchCard })
|
||||
local catchToken = 0
|
||||
|
||||
-- уведомления и карточка улова — в одной колонке сверху: пока карточка видна, уведомления уходят под неё
|
||||
H.toastBaseY = 84
|
||||
function H.placeToasts(cardShown)
|
||||
local y = H.toastBaseY
|
||||
if cardShown then
|
||||
local sc = catchCard:FindFirstChildOfClass("UIScale")
|
||||
y = 120 + catchCard.Size.Y.Offset * (sc and sc.Scale or 1) + 10
|
||||
end
|
||||
TweenService:Create(toasts, TweenInfo.new(0.3, Enum.EasingStyle.Quad), { Position = UDim2.new(0.5, 0, 0, y) }):Play()
|
||||
end
|
||||
|
||||
local function showCatch(fish, extra)
|
||||
catchToken += 1
|
||||
local my = catchToken
|
||||
@@ -349,11 +360,13 @@ local function showCatch(fish, extra)
|
||||
catchValue.Text = ("⚪ %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1),
|
||||
(extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "")
|
||||
catchCard.Visible = true
|
||||
H.placeToasts(true)
|
||||
TweenService:Create(catchCard, TweenInfo.new(0.45, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0, 120) }):Play()
|
||||
task.delay(3.4, function()
|
||||
if my == catchToken then
|
||||
local tw = TweenService:Create(catchCard, TweenInfo.new(0.35, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { Position = UDim2.new(0.5, 0, 0, -220) })
|
||||
tw:Play()
|
||||
H.placeToasts(false)
|
||||
tw.Completed:Wait()
|
||||
if my == catchToken then
|
||||
catchCard.Visible = false
|
||||
@@ -1147,7 +1160,8 @@ do
|
||||
side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216)
|
||||
side.Size = compact and UDim2.fromOffset(170, 240) or UDim2.fromOffset(70, 480)
|
||||
toasts.Size = compact and UDim2.fromOffset(640, 200) or UDim2.fromOffset(900, 200)
|
||||
toasts.Position = compact and UDim2.new(0.5, 0, 0, 66) or UDim2.new(0.5, 0, 0, 84)
|
||||
H.toastBaseY = compact and 66 or 84
|
||||
toasts.Position = UDim2.new(0.5, 0, 0, H.toastBaseY)
|
||||
scaleOf(toasts).Scale = compact and 0.75 or 1
|
||||
scaleOf(catchCard).Scale = compact and 0.8 or 1
|
||||
scaleOf(mgFrame).Scale = compact and 0.85 or 1
|
||||
|
||||
Reference in new issue
Block a user