protected override void HandleIsActiveChanged(bool newIsActive) { if (newIsActive) { FindSeatController findSeatController = GetComponent <FindSeatController>(); findSeatController.setTbc(GameObject.Find("TableFiller").GetComponent <TableFillerController>()); findSeatController.seat(findSeatController.getTbc().getTable()); } }
private void createPlayer(GameObject prefab, Transform parent, string name, Vector3 position, int dialogPos) { GameObject player = Instantiate(prefab); player.transform.SetParent(parent); player.name = name; player.transform.position = position; FindSeatController findSeatController = player.GetComponent <FindSeatController>(); findSeatController.setTbc(GameObject.Find("TableFiller").GetComponent <TableFillerController>()); findSeatController.seat(findSeatController.getTbc().getTable()); }