Exemple #1
0
    //*******************************//
    //    MonoBehaviour Functions    //
    //*******************************//

    private void Start()
    {
        m_controller = FindObjectOfType <AreaController>();
        m_manager    = AreaTransitionManager.Instance;

        if (!m_controller)
        {
            Debug.LogErrorFormat("{0}: Could not find area controller!", name);
        }
    }
Exemple #2
0
    //*******************************//
    //    MonoBehaviour Functions    //
    //*******************************//

    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(this);
        }

        m_fader = GetComponent <CanvasGroupFader>();
    }
Exemple #3
0
    //*******************************//
    //    MonoBehaviour Functions    //
    //*******************************//

    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(this);
        }

        m_formatter             = new BinaryFormatter();
        m_savePath              = Application.persistentDataPath + "/";
        m_areaTransitionManager = FindObjectOfType <AreaTransitionManager>();
    }