using UnityEngine; using UnityEngine.UI; namespace DiamondArrow { public sealed partial class DiamondArrowGame { string checkinDisplayedDate; public void ShowCheckin() { checkinDisplayedDate = Today; bool claimed = Save.checkinDate == checkinDisplayedDate; int current = claimed ? (Save.checkinDay + 5) % 7 + 1 : Save.checkinDay; var page = Sheet("DAILY CHECK-IN", 944); for (int day = 1; day <= 7; day++) { bool finale = day == 7; bool collected = day < current || (day == current && claimed); bool available = day == current && !claimed; const float margin = 40, gap = 24, height = 138; float fullWidth = page.rect.width - 2 * margin; float cardWidth = (fullWidth - gap) / 2; float x = margin + (day - 1) % 2 * (cardWidth + gap); float y = 142 + (day - 1) / 2 * (height + gap); float width = finale ? fullWidth : cardWidth; var tile = Panel(page, "Day " + day, x, y, width, height, false); var face = tile.GetComponent(); face.top = available ? Neon.Hex("#503649") : finale ? Neon.Hex("#3C2149") : Neon.Hex("#2D1B3B"); if (available) Rule(tile, 6, 36, 4, Neon.Gold, 66); float textX = finale ? 182 : 98; float textWidth = width - textX - 16; string date = "DAY " + day; if (available) date = "TODAY · " + date; if (collected) date += " · CLAIMED"; Label(tile, date, textX, 29, textWidth, 28, 18, available ? Neon.Gold : Neon.Muted, TextAnchor.MiddleLeft); Label(tile, Economy.CheckinLabels[day - 1], textX, 68, textWidth, 40, finale ? 27 : 23, collected ? Neon.Muted : Color.white, TextAnchor.MiddleLeft); if (finale) { Icon(tile, 1, 24, 38, 62); Icon(tile, 11, 96, 38, 62); } else { Icon(tile, day == 4 ? 10 : 1, 20, 38, 62); } } var claim = FooterButton(page, "Claim", 70, 540, claimed ? "CLAIMED TODAY" : "CLAIM DAY " + current, () => { if (!Economy.CheckIn(Save, Today)) return; Persist(); Sound(SoundCue.Reward); ShowCheckin(); }, !claimed); claim.GetComponent