コード例 #1
0
        public override void Configure(SystemGameManager systemGameManager)
        {
            base.Configure(systemGameManager);
            keyBindManager   = systemGameManager.KeyBindManager;
            uIManager        = systemGameManager.UIManager;
            namePlateManager = uIManager.NamePlateManager;

            SystemEventManager.StartListening("OnLevelLoad", HandleLevelLoad);
        }
コード例 #2
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);
        }
コード例 #3
0
 private void CreateEventSubscriptions()
 {
     //Debug.Log("MainMapController.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.StartListening("OnLevelLoad", HandleLevelLoad);
     eventSubscriptionsInitialized = true;
 }
コード例 #4
0
 private void CreateEventSubscriptions()
 {
     //Debug.Log("TransparencyButton.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.StartListening("OnPagedButtonsTransparencyUpdate", HandlePagedButtonsTransparencyUpdate);
     eventSubscriptionsInitialized = true;
 }
コード例 #5
0
 protected override void ProcessCreateEventSubscriptions()
 {
     base.ProcessCreateEventSubscriptions();
     SystemEventManager.StartListening("OnXPGained", HandleXPGained);
     systemEventManager.OnLevelChanged += UpdateXPBar;
     SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     if (playerManager.PlayerUnitSpawned == true)
     {
         ProcessPlayerUnitSpawn();
     }
 }
コード例 #6
0
 public override void CreateEventSubscriptions()
 {
     // called from base.start
     //Debug.Log(gameObject.name + ".PlayerAnimator.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized == true)
     {
         return;
     }
     base.CreateEventSubscriptions();
     SystemEventManager.StartListening("OnReviveComplete", HandleReviveComplete);
 }
コード例 #7
0
 protected override void ProcessCreateEventSubscriptions()
 {
     //Debug.Log("CharacterPanel.CreateEventSubscriptions()");
     base.ProcessCreateEventSubscriptions();
     SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     SystemEventManager.StartListening("OnPlayerUnitDespawn", HandlePlayerUnitDespawn);
     if (playerManager.PlayerUnitSpawned == true)
     {
         ProcessPlayerUnitSpawn();
     }
 }
コード例 #8
0
 public void SetupScriptableObjects()
 {
     if (prerequisiteName != null && prerequisiteName != string.Empty)
     {
         prerequisiteFaction = SystemFactionManager.MyInstance.GetResource(prerequisiteName);
     }
     else
     {
         Debug.LogError("SystemAbilityManager.SetupScriptableObjects(): Could not find dialog : " + prerequisiteName + " while inititalizing a dialog prerequisite.  CHECK INSPECTOR");
     }
     SystemEventManager.StartListening("OnReputationChange", HandleReputationChange);
 }
コード例 #9
0
 private void CreateEventSubscriptions()
 {
     //Debug.Log("LogManager.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     systemEventManager.OnTakeDamage += HandleTakeDamage;
     SystemEventManager.StartListening("OnPlayerConnectionSpawn", handlePlayerConnectionSpawn);
     SystemEventManager.StartListening("OnPlayerConnectionDespawn", handlePlayerConnectionDespawn);
     eventSubscriptionsInitialized = true;
 }
コード例 #10
0
        public override void Awake()
        {
            //Debug.Log(gameObject.name + ": MiniMapController.Awake()");
            base.Awake();
            //instantiate singleton
            MainMapController tempcontroller = MyInstance;

            CameraManager.MyInstance.MainMapCamera.enabled = false;

            SystemEventManager.StartListening("AfterCameraUpdate", HandleAfterCameraUpdate);
            SystemEventManager.StartListening("OnLevelUnload", HandleLevelUnload);
        }
コード例 #11
0
 public void SetupScriptableObjects(SystemGameManager systemGameManager)
 {
     Configure(systemGameManager);
     if (prerequisiteName != null && prerequisiteName != string.Empty)
     {
         prerequisiteFaction = systemDataFactory.GetResource <Faction>(prerequisiteName);
     }
     else
     {
         Debug.LogError("SystemAbilityManager.SetupScriptableObjects(): Could not find dialog : " + prerequisiteName + " while inititalizing a dialog prerequisite.  CHECK INSPECTOR");
     }
     SystemEventManager.StartListening("OnReputationChange", HandleReputationChange);
 }
コード例 #12
0
        protected override void ProcessCreateEventSubscriptions()
        {
            //Debug.Log("QuestTrackerUI.InitializeReferences()");
            base.ProcessCreateEventSubscriptions();

            SystemEventManager.StartListening("OnQuestObjectiveStatusUpdated", HandleQuestObjectiveStatusUpdated);
            SystemEventManager.StartListening("OnAfterQuestStatusUpdated", HandleAfterQuestStatusUpdated);
            SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
            if (playerManager.PlayerUnitSpawned == true)
            {
                ShowQuests();
            }
        }
コード例 #13
0
ファイル: PlayerStats.cs プロジェクト: jon205/AnyRPGAlphaCode
 public override void CreateEventSubscriptions()
 {
     //Debug.Log(gameObject.name + ".PlayerStats.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     base.CreateEventSubscriptions();
     //SystemEventManager.MyInstance.OnEquipmentChanged += OnEquipmentChanged;
     SystemEventManager.MyInstance.OnLevelChanged += LevelUpHandler;
     SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     SystemEventManager.MyInstance.OnPlayerUnitDespawn += HandlePlayerUnitDespawn;
     eventSubscriptionsInitialized = true;
 }
コード例 #14
0
 public void CreateEventSubscriptions()
 {
     //Debug.Log("PlayerManager.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.StartListening("OnPlayerConnectionSpawn", HandlePlayerConnectionSpawn);
     if (playerManager.PlayerConnectionSpawned == true)
     {
         AcceptAchievements();
     }
     eventSubscriptionsInitialized = true;
 }
コード例 #15
0
 protected void CreateEventSubscriptions()
 {
     //Debug.Log("CharacterPanel.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     SystemEventManager.StartListening("OnPlayerUnitDespawn", HandlePlayerUnitDespawn);
     if (playerManager.PlayerUnitSpawned == true)
     {
         ProcessPlayerUnitSpawn();
     }
     eventSubscriptionsInitialized = true;
 }
コード例 #16
0
 protected override void CreateEventSubscriptions()
 {
     //Debug.Log(gameObject.name + ".PlayerEquipmentManager.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     if (baseCharacter != null)
     {
         baseCharacter.OnClassChange += HandleClassChange;
     }
     SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     SystemEventManager.MyInstance.OnPlayerUnitDespawn += HandlePlayerUnitDespawn;
     base.CreateEventSubscriptions();
 }
コード例 #17
0
 public void CreateEventSubscriptions()
 {
     //Debug.Log("XPBarController.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     SystemEventManager.MyInstance.OnXPGained     += UpdateXP;
     SystemEventManager.MyInstance.OnLevelChanged += UpdateXPBar;
     SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     if (PlayerManager.MyInstance.PlayerUnitSpawned == true)
     {
         ProcessPlayerUnitSpawn();
     }
     eventSubscriptionsInitialized = true;
 }
コード例 #18
0
        public void InitializeReferences()
        {
            //Debug.Log("QuestTrackerUI.InitializeReferences()");
            if (referencesInitialized == true)
            {
                return;
            }
            SystemEventManager.MyInstance.OnQuestObjectiveStatusUpdated += ShowQuests;
            SystemEventManager.MyInstance.OnAfterQuestStatusUpdated     += ShowQuests;
            SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
            if (PlayerManager.MyInstance != null && PlayerManager.MyInstance.MyPlayerUnitSpawned == true)
            {
                ShowQuests();
            }

            referencesInitialized = true;
        }
コード例 #19
0
 public virtual void CreateEventSubscriptions()
 {
     //Debug.Log(gameObject.name + "CharacterAbilityManager.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     if (SystemEventManager.MyInstance == null)
     {
         Debug.LogError(gameObject.name + ".PersistentObject.CreateEventSubscriptions: Could not find SystemEventManager.  Is GameManager in the scene?");
     }
     else
     {
         SystemEventManager.StartListening("OnLevelUnload", HandleLevelUnload);
         SystemEventManager.StartListening("OnSaveGame", HandleSaveGame);
     }
     eventSubscriptionsInitialized = true;
 }
コード例 #20
0
 private void CreateEventSubscriptions()
 {
     //Debug.Log(gameObject.name + ".UnitSpawnNode.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     if (SystemEventManager.MyInstance == null)
     {
         Debug.LogError(gameObject.name + ".UnitSpawnNode.CreateEventSubscriptions(): SystemEventManager not found.  Is the GameManager in the scene?");
         return;
     }
     SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     if (PlayerManager.MyInstance.MyPlayerUnitSpawned == true)
     {
         //Debug.Log(gameObject.name + ".UnitSpawnNode.CreateEventSubscriptions(): player unit already spawned.  Handling player unit spawn");
         ProcessPlayerUnitSpawn();
     }
     eventSubscriptionsInitialized = true;
 }
コード例 #21
0
 public override void CreateEventSubscriptions()
 {
     //Debug.Log(gameObject.name + ".PlayerAbilityManager.CreateEventSubscriptions()");
     if (eventSubscriptionsInitialized)
     {
         return;
     }
     base.CreateEventSubscriptions();
     SystemEventManager.MyInstance.OnLevelChanged += UpdateAbilityList;
     SystemEventManager.StartListening("OnPlayerUnitSpawn", HandlePlayerUnitSpawn);
     SystemEventManager.MyInstance.OnPlayerUnitDespawn += HandleCharacterUnitDespawn;
     if (PlayerManager.MyInstance.MyPlayerUnitSpawned)
     {
         //Debug.Log(gameObject.name + ".PlayerAbilityManager.CreateEventSubscriptions() Player is already spawned");
         ProcessCharacterUnitSpawn();
     }
     if (KeyBindManager.MyInstance != null && KeyBindManager.MyInstance.MyKeyBinds != null && KeyBindManager.MyInstance.MyKeyBinds.ContainsKey("CANCEL"))
     {
         KeyBindManager.MyInstance.MyKeyBinds["CANCEL"].OnKeyPressedHandler += OnEscapeKeyPressedHandler;
     }
 }
コード例 #22
0
        public override void Awake()
        {
            //Debug.Log(gameObject.name + ": MiniMapController.Awake()");
            base.Awake();
            if (SystemConfigurationManager.MyInstance.SystemBarMap != null)
            {
                mapButtonImage.sprite = SystemConfigurationManager.MyInstance.SystemBarMap;
                mapButtonImage.color  = Color.white;
                mapButtonText.SetActive(false);
            }
            else
            {
                mapButtonImage.sprite = null;
                mapButtonImage.color  = Color.black;
                mapButtonText.SetActive(true);
            }

            minimapTextureFolder = minimapTextureFolderBase + SystemConfigurationManager.MyInstance.GameName.Replace(" ", "") + "/Images/MiniMap/";

            //instantiate singleton
            MiniMapController tempcontroller = MyInstance;

            rectTransform = gameObject.GetComponent <RectTransform>();

            // set initial camera size
            if (PlayerPrefs.HasKey("MiniMapZoomLevel"))
            {
                cameraSize = PlayerPrefs.GetFloat("MiniMapZoomLevel");
            }
            else
            {
                cameraSize = cameraSizeDefault;
            }

            SystemEventManager.StartListening("AfterCameraUpdate", HandleAfterCameraUpdate);
            SystemEventManager.StartListening("OnLevelUnload", HandleLevelUnload);
        }
コード例 #23
0
        public override void Configure(SystemGameManager systemGameManager)
        {
            base.Configure(systemGameManager);

            SystemEventManager.StartListening("OnLevelUnload", HandleLevelUnload);
        }
コード例 #24
0
 private void Awake()
 {
     //Debug.Log("NamePlateManager.Awake(): " + NamePlateManager.MyInstance.gameObject.name);
     SystemEventManager.StartListening("AfterCameraUpdate", HandleAfterCameraUpdate);
 }
コード例 #25
0
 public void Start()
 {
     SystemEventManager.StartListening("OnLevelLoad", HandleLevelLoad);
 }
コード例 #26
0
ファイル: VendorUI.cs プロジェクト: michaelday008/AnyRPGCore
 protected override void ProcessCreateEventSubscriptions()
 {
     //Debug.Log("VendorUI.CreateEventSubscriptions()");
     base.ProcessCreateEventSubscriptions();
     SystemEventManager.StartListening("OnCurrencyChange", HandleCurrencyChange);
 }