public void showPanel(int randomizedIndex) { gc = GameObject.Find("GameController"); fcgc = gc.GetComponent <fcGameController1> (); img.GetComponent <showImage> ().show(randomizedIndex.ToString()); uiTxtHindiName.text = fcgc.flashCards.cardList [randomizedIndex].hindiName; uiTxtEnglishName.text = fcgc.flashCards.cardList [randomizedIndex].englishName; }
// Use this for initialization void Start() { GameObject go = GameObject.Find("GameController"); if (go != null) { gameControllerScript = go.GetComponent <fcGameController1>(); } if (gameControllerScript == null) { Debug.Log("Cannot find 'GameController' script"); } }
// Use this for initialization void Start() { GameObject go = GameObject.Find("GameController"); if (go != null) { gameControllerScript = go.GetComponent <fcGameController1>(); } if (gameControllerScript == null) { Debug.Log("Cannot find 'GameController' script"); } maxMove = gameControllerScript.getPH2().transform.position.y - gameControllerScript.getPH3().transform.position.y; maxMove = 0.40f * Mathf.Abs(maxMove); }
void Start() { gc = GameObject.Find("GameController"); fcgc = gc.GetComponent <fcGameController1> (); }