// Update is called once per frame void Update() { aimZone = scope.GetComponent <Octo_sort>().passZone(); //target = aimZone.lockon(scope.transform); if ((Input.GetKey(KeyCode.Mouse0) || Input.GetKey(KeyCode.Comma)) && pace2 == true) { StartCoroutine(fire2()); } else if ((Input.GetKeyUp(KeyCode.Mouse0) || Input.GetKeyDown(KeyCode.Comma)) && chargeTimer > 2f && pace2 == true) { // create a script that fires missles with octo_sort at the given transform if (target != null) { StartCoroutine(fire2()); } else { target = foward; StartCoroutine(fire2()); } target = null; chargeTimer = 0; } else if ((Input.GetKey(KeyCode.Mouse0) || Input.GetKeyDown(KeyCode.Comma)) && chargeTimer < 2f) { chargeTimer += Time.deltaTime; //Debug.Log("squak"); } if (bulletList.ListSum() <= bulletID) { bulletID = 0; } }