using System; using System.Collections.Generic; using Activity.HomeEntranceBtn; using asap.core; using EventSmash.Manager; using game; using GameCore; using UnityEngine; namespace EventSmash { public class EventSmashEntranceButton : AbstractHomeEntranceBtn { protected override Type AssociatedSentryType => typeof(EventSmashSentry); protected override void OnClickBtn() { try { if (Data?.MainConfig != null) GContext.Publish(new UnloadActToNextAct(EventSmashAct.ActAddress)); } catch (Exception e) { Debug.LogError(e); } } protected override string GetIconName() { return Data?.MainConfig?.Icon ?? ""; } protected override List GetResourceNames() { var mainConfig = Data?.MainConfig; if (mainConfig == null) return new List(); var names = new List { mainConfig.UIPanel, mainConfig.InfoPanel, mainConfig.BattlePassPanel, mainConfig.PackPanel, mainConfig.Icon }; names.AddRange(mainConfig.CollectionIcon); return names; } } }