void Start() { user = GameObject.Find("User"); _ObjectManager = GameObject.Find("GameEvents").GetComponent <ObjectManager>(); _StateManager = GameObject.Find("GameEvents").GetComponent <StateManager>(); _UIController = GameObject.Find("GameEvents").GetComponent <UIController>(); _PileReturn = GameObject.Find("Actions").GetComponent <PileReturn>(); _ObjectState = new ObjectState(); busy = false; menuUp = false; menu.transform.position = new Vector3(0, -20, 0); }
void Start() { _ObjectState = new ObjectState(); _ObjectManager = GameObject.Find("GameEvents").GetComponent <ObjectManager>(); //gets the component ObjectManager from the GameObject GameEvents // Intialize actions from components on Action gameobject. All future actions should be attached to Action object and called in the same way // All actions also need to implment the function Act() _PileGrab = GameObject.Find("Actions").GetComponent <PileGrab>(); _Shelfgrab = GameObject.Find("Actions").GetComponent <ShelfGrab>(); _StateManager = GameObject.Find("GameEvents").GetComponent <StateManager>(); _ViewCart = GameObject.Find("Actions").GetComponent <ViewCart>(); _PileToCart = GameObject.Find("Actions").GetComponent <PileToCart>(); _PileReturn = GameObject.Find("Actions").GetComponent <PileReturn>(); _mapState = GameObject.Find("Actions").GetComponent <Map>(); }