void OnTriggerEnter(Collider col) { if (col.tag == "Boat") { boatCont = col.GetComponent<boatControls>(); boatCont.OnCloud(true); onCloud = true; cloudCont.enabled = true; boat = col.transform; wanderScript.enabled=false; } }
// Use this for initialization void Start() { player = GameObject.Find ("Player").transform; controls = GetComponent<boatControls> (); }