protected override void ProcessCleanupEventSubscriptions()
 {
     //Debug.Log("PlayerCombat.CleanupEventSubscriptions()");
     base.ProcessCleanupEventSubscriptions();
     SystemEventManager.StopListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     SystemEventManager.StopListening("OnPlayerUnitDespawn", HandlePlayerUnitDespawn);
 }
 public void CleanupScriptableObjects()
 {
     if (SystemEventManager.MyInstance != null)
     {
         SystemEventManager.StopListening("OnReputationChange", HandleReputationChange);
     }
 }
Exemple #3
0
 protected override void ProcessCleanupEventSubscriptions()
 {
     //Debug.Log("XPBarController.CleanupEventSubscriptions()");
     SystemEventManager.StopListening("OnXPGained", HandleXPGained);
     systemEventManager.OnLevelChanged -= UpdateXPBar;
     SystemEventManager.StopListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
 }
        public void HandleEndEdit()
        {
            EventParamProperties eventParam = new EventParamProperties();

            SystemEventManager.TriggerEvent("OnEnableMovement", eventParam);
            controlsManager.DeactivateTextInput();
        }
 public override void SetGameManagerReferences()
 {
     base.SetGameManagerReferences();
     systemDataFactory  = systemGameManager.SystemDataFactory;
     playerManager      = systemGameManager.PlayerManager;
     systemEventManager = systemGameManager.SystemEventManager;
 }
        public override void SetAttacking(bool varValue, bool swapAnimator = true)
        {
            //Debug.Log(gameObject.name + ".SetAttacking(" + varValue + ")");
            if (animator == null)
            {
                return;
            }
            EventParamProperties eventParam = new EventParamProperties();

            if (varValue == true)
            {
                if (swapAnimator)
                {
                    SetDefaultOverrideController();
                }
                SystemEventManager.TriggerEvent("OnStartAttacking", eventParam);
            }

            base.SetAttacking(varValue);

            if (varValue == false)
            {
                if (swapAnimator)
                {
                    SetCorrectOverrideController();
                    SystemEventManager.TriggerEvent("OnEndAttacking", eventParam);
                }
            }
        }
        public void HandlePointerClick()
        {
            EventParamProperties eventParam = new EventParamProperties();

            SystemEventManager.TriggerEvent("OnDisableMovement", eventParam);
            controlsManager.ActivateTextInput();
        }
 public override void HandleDeath(CharacterStats characterStats)
 {
     //Debug.Log(gameObject.name + ".PlayerAnimator.HandleDeath()");
     SetDefaultOverrideController();
     SystemEventManager.TriggerEvent("OnDeath", new EventParamProperties());
     base.HandleDeath(characterStats);
 }
 public override void CleanupEventSubscriptions()
 {
     //Debug.Log(gameObject.name + ".PlayerAnimator.CleanupEventSubscriptions()");
     // called from base.onDisable
     base.CleanupEventSubscriptions();
     SystemEventManager.StopListening("OnReviveComplete", HandleReviveComplete);
 }
        /*
         * public override void ClearAnimationBlockers() {
         *  //Debug.Log(gameObject.name + ".PlayerAnimator.ClearAnimationBlockers()");
         *  base.ClearAnimationBlockers();
         * }
         */

        public override void SetCasting(bool varValue, bool swapAnimator = true, float castingSpeed = 1f)
        {
            //Debug.Log(gameObject.name + ".PlayerAnimator.SetCasting(" + varValue + ", " + swapAnimator + ", " + castingSpeed + ")");
            if (animator == null)
            {
                return;
            }

            EventParamProperties eventParam = new EventParamProperties();

            if (varValue == true)
            {
                if (swapAnimator == true)
                {
                    SetDefaultOverrideController();
                }
                SystemEventManager.TriggerEvent("OnStartCasting", eventParam);
            }

            base.SetCasting(varValue, swapAnimator, castingSpeed);

            if (varValue == false)
            {
                if (swapAnimator)
                {
                    SetCorrectOverrideController();
                    SystemEventManager.TriggerEvent("OnEndCasting", eventParam);
                }
            }
        }
Exemple #11
0
 public override void SetGameManagerReferences()
 {
     //Debug.Log("CharacterClassPrerequisite.SetGameManagerReferences()");
     base.SetGameManagerReferences();
     systemDataFactory  = systemGameManager.SystemDataFactory;
     playerManager      = systemGameManager.PlayerManager;
     systemEventManager = systemGameManager.SystemEventManager;
 }
Exemple #12
0
 protected override void ProcessCleanupEventSubscriptions()
 {
     //Debug.Log("QuestTrackerUI.CleanupEventSubscriptions()");
     base.ProcessCleanupEventSubscriptions();
     SystemEventManager.StopListening("OnQuestObjectiveStatusUpdated", HandleQuestObjectiveStatusUpdated);
     SystemEventManager.StopListening("OnAfterQuestStatusUpdated", HandleAfterQuestStatusUpdated);
     SystemEventManager.StopListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
 }
Exemple #13
0
 public override void AddReputation(Faction faction, int reputationAmount, bool notify = true)
 {
     base.AddReputation(faction, reputationAmount);
     if (notify)
     {
         SystemEventManager.TriggerEvent("OnReputationChange", new EventParamProperties());
     }
 }
        public override void Configure(SystemGameManager systemGameManager)
        {
            base.Configure(systemGameManager);
            keyBindManager   = systemGameManager.KeyBindManager;
            uIManager        = systemGameManager.UIManager;
            namePlateManager = uIManager.NamePlateManager;

            SystemEventManager.StartListening("OnLevelLoad", HandleLevelLoad);
        }
        public override void HandleStunned()
        {
            //Debug.Log(gameObject.name + ".PlayerAnimator.HandleStunned()");
            SetDefaultOverrideController();
            EventParamProperties eventParam = new EventParamProperties();

            SystemEventManager.TriggerEvent("OnStartStunned", eventParam);
            base.HandleStunned();
        }
Exemple #16
0
 private void CreateEventSubscriptions()
 {
     //Debug.Log("TransparencyButton.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.StartListening("OnPagedButtonsTransparencyUpdate", HandlePagedButtonsTransparencyUpdate);
     eventSubscriptionsInitialized = true;
 }
Exemple #17
0
 public void CleanupEventSubscriptions()
 {
     //Debug.Log("PlayerManager.CleanupEventSubscriptions()");
     if (!eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.StopListening("OnPlayerConnectionSpawn", HandlePlayerConnectionSpawn);
     eventSubscriptionsInitialized = false;
 }
Exemple #18
0
 public void InventorySlotOpacitySliderUpdate()
 {
     if (configureCount == 0)
     {
         return;
     }
     PlayerPrefs.SetFloat("InventorySlotOpacity", inventorySlotOpacitySlider.value);
     uIManager.UpdateInventoryOpacity();
     SystemEventManager.TriggerEvent("OnInventoryTransparencyUpdate", new EventParamProperties());
 }
Exemple #19
0
        public override void Configure(SystemGameManager systemGameManager)
        {
            base.Configure(systemGameManager);
            cameraManager = systemGameManager.CameraManager;
            playerManager = systemGameManager.PlayerManager;
            objectPooler  = systemGameManager.ObjectPooler;

            SystemEventManager.StartListening("AfterCameraUpdate", HandleAfterCameraUpdate);
            SystemEventManager.StartListening("OnLevelUnload", HandleLevelUnload);
        }
 public override void HandleUnLevitated(bool swapAnimator = true)
 {
     base.HandleUnLevitated(swapAnimator);
     if (swapAnimator)
     {
         SetCorrectOverrideController();
         EventParamProperties eventParam = new EventParamProperties();
         SystemEventManager.TriggerEvent("OnEndLevitated", eventParam);
     }
 }
Exemple #21
0
 public void PagedButtonsOpacitySliderUpdate()
 {
     //Debug.Log("MainSettingsMenuController.PagedButtonsOpacitySliderUpdate()");
     if (configureCount == 0)
     {
         return;
     }
     PlayerPrefs.SetFloat("PagedButtonsOpacity", pagedButtonsOpacitySlider.value);
     SystemEventManager.TriggerEvent("OnPagedButtonsTransparencyUpdate", new EventParamProperties());
 }
Exemple #22
0
 private void CleanupEventSubscriptions()
 {
     //Debug.Log("TransparencyButton.CleanupEventSubscriptions()");
     if (!eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.StopListening("OnPagedButtonsTransparencyUpdate", HandlePagedButtonsTransparencyUpdate);
     eventSubscriptionsInitialized = false;
 }
 private void CleanupEventSubscriptions()
 {
     //Debug.Log("PlayerManager.CleanupEventSubscriptions()");
     if (!eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.StopListening("OnLevelLoad", HandleLevelLoad);
     eventSubscriptionsInitialized = false;
 }
 private void CreateEventSubscriptions()
 {
     //Debug.Log("MainMapController.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.StartListening("OnLevelLoad", HandleLevelLoad);
     eventSubscriptionsInitialized = true;
 }
 public override void HandleUnStunned(bool swapAnimator = true)
 {
     //Debug.Log(gameObject.name + ".CharacterAnimator.HandleUnStunned()");
     base.HandleUnStunned(swapAnimator);
     if (swapAnimator)
     {
         SetCorrectOverrideController();
         EventParamProperties eventParam = new EventParamProperties();
         SystemEventManager.TriggerEvent("OnEndStunned", eventParam);
     }
 }
 public override void CreateEventSubscriptions()
 {
     // called from base.start
     //Debug.Log(gameObject.name + ".PlayerAnimator.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized == true)
     {
         return;
     }
     base.CreateEventSubscriptions();
     SystemEventManager.StartListening("OnReviveComplete", HandleReviveComplete);
 }
Exemple #27
0
 protected override void ProcessCreateEventSubscriptions()
 {
     base.ProcessCreateEventSubscriptions();
     SystemEventManager.StartListening("OnXPGained", HandleXPGained);
     systemEventManager.OnLevelChanged += UpdateXPBar;
     SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     if (playerManager.PlayerUnitSpawned == true)
     {
         ProcessPlayerUnitSpawn();
     }
 }
Exemple #28
0
 public void CleanupEventSubscriptions()
 {
     //Debug.Log("QuestTrackerUI.CleanupEventSubscriptions()");
     if (SystemEventManager.MyInstance != null)
     {
         SystemEventManager.MyInstance.OnQuestObjectiveStatusUpdated -= ShowQuests;
         SystemEventManager.MyInstance.OnQuestStatusUpdated          -= ShowQuests;
         SystemEventManager.StopListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     }
     referencesInitialized = false;
 }
 protected override void ProcessCreateEventSubscriptions()
 {
     //Debug.Log("CharacterPanel.CreateEventSubscriptions()");
     base.ProcessCreateEventSubscriptions();
     SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     SystemEventManager.StartListening("OnPlayerUnitDespawn", HandlePlayerUnitDespawn);
     if (playerManager.PlayerUnitSpawned == true)
     {
         ProcessPlayerUnitSpawn();
     }
 }
        public override void SetGameManagerReferences()
        {
            base.SetGameManagerReferences();

            playerManager         = systemGameManager.PlayerManager;
            systemEventManager    = systemGameManager.SystemEventManager;
            uIManager             = systemGameManager.UIManager;
            cameraManager         = systemGameManager.CameraManager;
            saveManager           = systemGameManager.SaveManager;
            characterPanelManager = systemGameManager.CharacterPanelManager;
        }