// Use this for initialization
	void Start () {

		//get the board controller
		m_boardController = GetComponent<BoardController>();
		if (m_boardController == null)
		{
			Debug.Log("<color=red>Couldn't find board controller</color>");
		}


		//get the trick controller
        m_trickController = GameObject.Find("Canvas").GetComponent<trickPointController>();
        if (m_trickController == null)
        {
            Debug.Log("<color=red>Couldn't find Canvas in Hierarchy</color>");
        }

        mRecoveryTimer = mTimer;
	}
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        //store the start position
        startPosition = transform;
        //get the rigidbody
        _rigid = GetComponent <Rigidbody>();

        //get the camera in the scene
        m_camera = GameObject.Find("Main Camera");
        if (m_camera == null)
        {
            Debug.Log("<color=red>Couldn't find Main Camera</color>");
        }

        //get the trickpointcontroller
        _trickController = GameObject.Find("Canvas").GetComponent <trickPointController>();
        if (_trickController == null)
        {
            Debug.Log("<color=red>Couldn't find Canvas in Hierarchy</color>");
        }
    }