using System; using System.Collections.Generic; using Activity.HomeEntranceBtn; using cfg; using EventBoostPack.Data; using UnityEngine; namespace EventBoostPack { public class EventBoostPackEntranceButton : AbstractHomeEntranceBtn { protected override Type AssociatedSentryType => typeof(EventBoostPackSentry); protected override void OnClickBtn() { try { ((EventBoostPackManager)_manager)?.ShowPanel(); } catch (Exception e) { Debug.LogError(e); } } protected override void UpdateTimer(long _ = 0L) { gameObject.SetActive(IsActivityActive()); TimeSpan timer = _cachedData?.RemainingTime ?? TimeSpan.Zero; textTimer.text = ConvertTools.ConvertTime2(timer); } protected override string GetIconName() { return Data?.PackConfig?.Icon; } protected override List GetResourceNames() { var config = Data?.PackConfig; if (config == null) return null; return new List { config.Panel, config.Icon }; } } }