private void Update() { if (visual != null) { SetData(); } else { InfoData.text = "No Target"; QueueData.text = ""; } if (Input.GetKeyDown(KeyCode.Mouse0)) { RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit)) { Transform objectHit = hit.transform; if (objectHit.GetComponent <Visualise>()) { visual = objectHit.GetComponent <Visualise>(); } // Do something with the object that was hit by the raycast. } } }
private void Awake() { visualise = GetComponent <Visualise>(); burst = burstCount; projectileFireSystem = GetComponent <ProjectileFireSystem>(); StartCoroutine(FireUpdater()); }
private void Awake() { lr = GetComponent <LineRenderer>(); lr.SetPosition(0, transform.position); visualise = GetComponent <Visualise>(); motion = GetComponent <Motion>(); dataLink = GetComponent <DataLink>(); }
private void Awake() { visualise = GetComponent <Visualise>(); ResetTracking(); }
private void Awake() { visualise = GetComponent <Visualise>(); dataLink = GetComponent <DataLink>(); StartCoroutine(ComputeCycle()); }
private void Awake() { visualise = GetComponent <Visualise>(); }