protected override void OnEnter() { base.OnEnter(); Character.SetSubState(CharacterBusyStates.UI); NotifyCenter.AddListener(MakingManager.MakingCanceled, OnMakingCanceled, this); making = WindowsManager.FindWindow <MakingWindow>(); }
public void Init(Talker questHolder) { this.questHolder = questHolder; if (MapManager.Instance) { if (mapIcon) { MapManager.Instance.RemoveMapIcon(mapIcon, true); } mapIcon = MapManager.Instance.CreateMapIcon(notAccepted, Vector2.one * 48, questHolder.GetData <TalkerData>().currentPosition, false, MapIconType.Quest, false); mapIcon.iconImage.raycastTarget = false; mapIcon.Hide(); } triggerNames.Clear(); foreach (var quest in questHolder.QuestInstances) { Condition find = quest.Model.AcceptCondition.Conditions.Find(x => x.Type == ConditionType.TriggerSet || x.Type == ConditionType.TriggerReset); if (find) { triggerNames.Add(find.TriggerName); } } UpdateUI(); Update(); NotifyCenter.RemoveListener(this); NotifyCenter.AddListener(QuestManager.QuestStateChanged, _ => UpdateUI(), this); NotifyCenter.AddListener(QuestManager.ObjectiveUpdate, _ => UpdateUI(), this); NotifyCenter.AddListener(NotifyCenter.CommonKeys.TriggerChanged, OnTriggerChange, this); }
protected override void RegisterNotify() { NotifyCenter.RemoveListener(this); if (SourceHandler != null) { NotifyCenter.AddListener(SourceHandler.ItemAmountChangedMsgKey, OnItemAmountChanged, this); } }
protected override void RegisterNotify() { NotifyCenter.AddListener(InventoryMoneyChangedMsgKey, OnInventoryMoneyChanged, this); NotifyCenter.AddListener(InventorySpaceChangedMsgKey, OnInventorySpaceChanged, this); NotifyCenter.AddListener(InventoryWeightChangedMsgKey, OnInventoryWeightChanged, this); NotifyCenter.AddListener(ItemAmountChangedMsgKey, OnItemAmountChanged, this); NotifyCenter.AddListener(SlotStateChangedMsgKey, OnSlotStateChanged, this); }
public void Init() { foreach (var quest in questsInProgress) { foreach (ObjectiveData o in quest.Objectives) { RemoveObjectiveMapIcon(o); } } questsInProgress.Clear(); questsFinished.Clear(); NotifyCenter.RemoveListener(this); NotifyCenter.AddListener(NotifyCenter.CommonKeys.TriggerChanged, OnTriggerChange); }
protected override void OnEnter() { base.OnEnter(); NotifyCenter.AddListener(Window.WindowStateChanged, OnWindowStateChanged, this); }
private void Start() { NotifyCenter.AddListener(QuestManager.QuestStateChanged, OnQuestStateChanged, this); NotifyCenter.AddListener(QuestManager.ObjectiveUpdate, OnObjectiveUpdate, this); Defocus(); }
protected override void RegisterNotify() { NotifyCenter.AddListener(QuestManager.QuestStateChanged, OnQuestStateChanged, this); NotifyCenter.AddListener(QuestManager.ObjectiveUpdate, OnObjectiveUpdate, this); }
private void RegisterNotify() { NotifyCenter.AddListener(NotifyCenter.CommonKeys.PlayerStateChanged, OnPlayerStateChanged, this); NotifyCenter.AddListener(PlayerBusyWithUI, OnPlayerBusyWithUI, this); }
protected override void RegisterNotify() { NotifyCenter.AddListener(StructureManager.StructureDestroy, OnBuidlingDestroy, this); }
protected override void RegisterNotify() { NotifyCenter.AddListener(StructureManager.StructureDestroy, OnDestroyStructure, this); NotifyCenter.AddListener(BackpackManager.BackpackItemAmountChanged, UpdateUI, this); }
protected override void RegisterNotify() { NotifyCenter.AddListener(FieldManager.FieldCropPlanted, OnCropPlanted, this); }