// Use this for initialization void Start() { markerScene = GameObject.FindGameObjectWithTag("MarkerScene"); m_BallThrowScript = m_Ball.GetComponent <BallThrow>(); artoolkit = GameObject.FindGameObjectWithTag("ARToolKit"); controller = gameObject.GetComponent <ControllerScript>(); cameraObject = GameObject.FindGameObjectWithTag("Finish"); cameraPosition = cameraObject.transform.position; cameraRotation = cameraObject.transform.rotation; m_UserScore = 0; m_NumAttempts = m_InitNumOfAttempts; scoreText = m_Target.transform.Find("Score").gameObject.GetComponent <TextMesh>(); }
public void Init(UnityAction scoreCallback, UnityAction loseCallback, BallThrow throwComponent) { this.throwComponent = throwComponent; onPlayerScored.AddListener(scoreCallback); onPlayerLost.AddListener(loseCallback); }