// Start is called before the first frame update void Start() { //get the transform object of the player player = FindObjectOfType <moveCharacter>().transform; inventory = FindObjectOfType <Inventory>(); dm = FindObjectOfType <dialog_manager>(); // get the position of all the collectibles on the scene and put them in a list collectibles = new List <collectible_object>(); foreach (collectible_object obj in FindObjectsOfType <collectible_object>()) { collectibles.Add(obj.GetComponent <collectible_object>()); } // get the position of all the dialogs on the scene and put them in a list dialogs = new List <dialogObject>(); foreach (dialogObject dialog in FindObjectsOfType <dialogObject>()) { dialogs.Add(dialog); } }
private void Start() { cm = GameObject.FindObjectOfType <cameraMovement>(); player = GameObject.FindObjectOfType <moveCharacter>().transform; dm = GameObject.FindObjectOfType <dialog_manager>(); }
void Awake() { instance = this; }
// Start is called before the first frame update void Start() { hb = GameObject.FindObjectOfType <Healthbar>(); dm = GameObject.FindObjectOfType <dialog_manager>(); cm = GameObject.FindObjectOfType <cameraMovement>(); }