Esempio n. 1
0
 protected override void OnEnter()
 {
     base.OnEnter();
     Character.SetSubState(CharacterBusyStates.UI);
     NotifyCenter.AddListener(MakingManager.MakingCanceled, OnMakingCanceled, this);
     making = WindowsManager.FindWindow <MakingWindow>();
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 protected override void RegisterNotify()
 {
     NotifyCenter.RemoveListener(this);
     if (SourceHandler != null)
     {
         NotifyCenter.AddListener(SourceHandler.ItemAmountChangedMsgKey, OnItemAmountChanged, this);
     }
 }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 protected override void OnEnter()
 {
     base.OnEnter();
     NotifyCenter.AddListener(Window.WindowStateChanged, OnWindowStateChanged, this);
 }
Esempio n. 7
0
 private void Start()
 {
     NotifyCenter.AddListener(QuestManager.QuestStateChanged, OnQuestStateChanged, this);
     NotifyCenter.AddListener(QuestManager.ObjectiveUpdate, OnObjectiveUpdate, this);
     Defocus();
 }
Esempio n. 8
0
 protected override void RegisterNotify()
 {
     NotifyCenter.AddListener(QuestManager.QuestStateChanged, OnQuestStateChanged, this);
     NotifyCenter.AddListener(QuestManager.ObjectiveUpdate, OnObjectiveUpdate, this);
 }
Esempio n. 9
0
 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);
 }
Esempio n. 11
0
 protected override void RegisterNotify()
 {
     NotifyCenter.AddListener(StructureManager.StructureDestroy, OnDestroyStructure, this);
     NotifyCenter.AddListener(BackpackManager.BackpackItemAmountChanged, UpdateUI, this);
 }
Esempio n. 12
0
 protected override void RegisterNotify()
 {
     NotifyCenter.AddListener(FieldManager.FieldCropPlanted, OnCropPlanted, this);
 }