public void AddInHall(Exploration exploration) { if (!explorationHallDic.ContainsKey(exploration.Uid)) { explorationHallDic.Add(exploration.Uid, exploration); } }
public void AddInBlock(Exploration exploration) { if (!explorationBlockDic.ContainsKey(exploration.Uid)) { explorationBlockDic.Add(exploration.Uid, exploration); } }
public static void Init(Exploration exploration) { exploration.Uid = Guid.NewGuid().ToString(); exploration.Script = ResourceManager.Instance.LoadAsset<ExplorationScript>(ObjectType.GameObject, exploration.Data.GetResPath()); exploration.Script.Uid = exploration.Uid; exploration.Script.transform.parent = RootTransform.Instance.ExplorationRoot; exploration.Script.CallbackClick = exploration.OnFunction; exploration.Script.CallbackEnter = exploration.OnEnter; exploration.Script.CallbackExit = exploration.OnExit; exploration.proxy = ApplicationFacade.Instance.RetrieveProxy<ExplorationProxy>(); }
public static void Recycle(Exploration exploration) { if (exploration != null) { if (exploration.Script.Icon != null) HUDIcon.Recycle(exploration.Script.Icon); exploration.Data = null; ResourceManager.Instance.RecycleAsset(exploration.Script.gameObject); exploration.Script = null; } else { BaseLogger.Log("Recyle a null exploration!"); } }
private static Exploration DoCreate(ExplorationData data, List<object> paramList) { Exploration exploration = null; switch (data.Type) { case ExplorationType.Transporter: { TransporterExpl expl = new TransporterExpl(); expl.Data = data; TransporterExpl.Init(expl, (TransporterDirectionType)paramList[0]); exploration = expl; break; } default: { exploration = new Exploration(); exploration.Data = data; Exploration.Init(exploration); break; } } return exploration; }
public void RemoveEnteredExploration(Exploration expl) { if (enteredExplorationSet.Contains(expl)) enteredExplorationSet.Remove(expl); }
public void AddEnteredExploration(Exploration expl) { if (!enteredExplorationSet.Contains(expl)) enteredExplorationSet.Add(expl); }