void Start() { inputRC = transform.Find("inputRC").GetComponent <InputField>(); txtRC = transform.Find("txtRC").GetComponent <Text>(); txtResult = transform.Find("txtResult").GetComponent <Text>(); btnOK = transform.Find("btnOK").GetComponent <Button>(); btnNext = transform.Find("btnNext").GetComponent <Button>(); btnStart = transform.Find("btnStart").GetComponent <Button>(); btnExit = transform.Find("btnExit").GetComponent <Button>(); btnTip = transform.Find("btnTip").GetComponent <Button>(); inputRC.gameObject.SetActive(false); txtRC.text = "RC = 0"; txtResult.gameObject.SetActive(false); btnOK.gameObject.SetActive(false); btnNext.gameObject.SetActive(false); btnOK.onClick.AddListener(okClick); btnNext.onClick.AddListener(nextClick); btnStart.onClick.AddListener(startClick); btnExit.onClick.AddListener(exitClick); btnTip.onClick.AddListener(tipClick); libraryModel = new TrainLibraryModel(); count = 0; }
void Start() { txtDealer = transform.Find("txtDealer").GetComponent <Text>(); txtPlayer = transform.Find("txtPlayer").GetComponent <Text>(); txtResult = transform.Find("txtResult").GetComponent <Text>(); btnHit = transform.Find("btnHit").GetComponent <Button>(); btnStand = transform.Find("btnStand").GetComponent <Button>(); btnDouble = transform.Find("btnDouble").GetComponent <Button>(); btnSplit = transform.Find("btnSplit").GetComponent <Button>(); btnNext = transform.Find("btnNext").GetComponent <Button>(); btnStart = transform.Find("btnStart").GetComponent <Button>(); btnExit = transform.Find("btnExit").GetComponent <Button>(); btnTip = transform.Find("btnTip").GetComponent <Button>(); txtResult.gameObject.SetActive(false); btnHit.gameObject.SetActive(false); btnStand.gameObject.SetActive(false); btnDouble.gameObject.SetActive(false); btnSplit.gameObject.SetActive(false); btnNext.gameObject.SetActive(false); btnHit.onClick.AddListener(hitClick); btnStand.onClick.AddListener(standClick); btnDouble.onClick.AddListener(doubleClick); btnSplit.onClick.AddListener(splitClick); btnNext.onClick.AddListener(nextClick); btnStart.onClick.AddListener(startClick); btnExit.onClick.AddListener(exitClick); btnTip.onClick.AddListener(tipClick); libraryModel = new TrainLibraryModel(); hashtableX = GetHtX(); hashtableY = GetHtY(); Matrix = GetMatrix(); dealerCardType = ""; playerCardType = ""; }