void Start() { controller = GameObject.Find("Model"); _ObjectManager = GameObject.Find("GameEvents").GetComponent <ObjectManager>(); _StateManager = GameObject.Find("GameEvents").GetComponent <StateManager>(); _ObjectState = new ObjectState(); busy = false; _ShelfGrab = this.GetComponent <ShelfGrab>(); }
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>(); }