void Awake()
    {
        if (instance != null && instance != this) {
            isSetToDestroy = true;
            Destroy(gameObject);
        } else {
            instance = this;
        }

        eventRegistery = GetComponentInChildren<EventRegistery>();
        saveFile = GetComponentInChildren<SaveFile>();
        systemFile = GetComponentInChildren<SystemFile>();
        dataFile = GetComponentInChildren<DataFile>();
        transitionery = GetComponentInChildren<TransitionManager>();
        view = GetComponentInChildren<GlobalView>();
    }
示例#2
0
 void Awake()
 {
     registery = transform.parent.GetComponent<EventRegistery>();
 }