// Use this for initialization void Start() { vacuumAudioSource = GetComponent <AudioSource>(); vacuum = vacuumZone.GetComponent <VacuumCollisionHandler>(); vacuumZoneRenderer = vacuumZone.GetComponent <MeshRenderer>(); vacuumZoneRenderer.enabled = false; vacuum.ison = false; }
public void VacuumedAction() { VacuumCollisionHandler vacuumCol = GameObject.FindObjectOfType <VacuumCollisionHandler>(); this.transform.SetParent(vacuumCol.gameObject.transform); moveMode = MovementMode.Stop; Debug.Log(this.name + " vacuumed"); StartCoroutine(WaitAndDestroy(2)); }