public void InitObjective() { // add this objective to the list contained in the objective manager ObjectiveManager objectiveManager = FindObjectOfType <ObjectiveManager>(); //DebugUtility.HandleErrorIfNullFindObject<ObjectiveManager, Objective>(objectiveManager, this); objectiveManager.RegisterObjective(this); // register this objective in the ObjectiveHUDManger m_ObjectiveHUDManger = FindObjectOfType <ObjectiveHUDManger>(); // DebugUtility.HandleErrorIfNullFindObject<ObjectiveHUDManger, Objective>(m_ObjectiveHUDManger, this); if (m_ObjectiveHUDManger) { m_ObjectiveHUDManger.RegisterObjective(this); } // register this objective in the NotificationHUDManager m_NotificationHUDManager = FindObjectOfType <NotificationHUDManager>(); // DebugUtility.HandleErrorIfNullFindObject<NotificationHUDManager, Objective>(m_NotificationHUDManager, this); if (m_NotificationHUDManager) { m_NotificationHUDManager.RegisterObjective(this); } }
protected void Register() { // add this objective to the list contained in the objective manager ObjectiveManager.RegisterObjective(this); // register this objective in the ObjectiveHUDManger m_ObjectiveHUDManger = FindObjectOfType <ObjectiveHUDManger>(); DebugUtility.HandleErrorIfNullFindObject <ObjectiveHUDManger, Objective>(m_ObjectiveHUDManger, this); m_ObjectiveHUDManger.RegisterObjective(this); // register this objective in the NotificationHUDManager m_NotificationHUDManager = FindObjectOfType <NotificationHUDManager>(); DebugUtility.HandleErrorIfNullFindObject <NotificationHUDManager, Objective>(m_NotificationHUDManager, this); m_NotificationHUDManager.RegisterObjective(this); }
void Start() { // add this objective to the list contained in the objective manager ObjectiveManager objectiveManager = FindObjectOfType <ObjectiveManager>(); DebugUtility.HandleErrorIfNullFindObject <ObjectiveManager, Objective>(objectiveManager, this); objectiveManager.RegisterObjective(this); // register this objective in the ObjectiveHUDManger m_ObjectiveHUDManger = FindObjectOfType <ObjectiveHUDManger>(); DebugUtility.HandleErrorIfNullFindObject <ObjectiveHUDManger, Objective>(m_ObjectiveHUDManger, this); m_ObjectiveHUDManger.RegisterObjective(this); // register this objective in the NotificationHUDManager m_NotificationHUDManager = FindObjectOfType <NotificationHUDManager>(); DebugUtility.HandleErrorIfNullFindObject <NotificationHUDManager, Objective>(m_NotificationHUDManager, this); m_NotificationHUDManager.RegisterObjective(this); player = GameObject.FindWithTag("Player").GetComponent <PlayerWeaponsManager>(); }