public override void QTest() { if (CooldownQ && IndQ.levelNum > 0) { stoppingAttack = Input.GetKeyUp(KeyCode.Q); Ab1 = Input.GetKey(KeyCode.Q); bool leftClick = Input.GetMouseButton(0); bool touch = Input.GetKeyDown(KeyCode.Q); if (Ab1 && !stoppingAttack && anythingWorks) { QIndicator.SetActive(true); QPressed = true; } else if (QPressed || (leftClick && Ab1)) { QIndicator.SetActive(false); QPressed = false; isInvisible = false; activateQ(); } else { QIndicator.SetActive(false); QPressed = false; } if (Ab1 && endingAttack) { } if (touch) { anythingWorks = true; endingAttack = false; } } }
public override void QTest() { if (CooldownQ && IndQ.levelNum > 0) { stoppingAttack = Input.GetKeyUp(KeyCode.Q); Ab1 = Input.GetKey(KeyCode.Q); bool leftClick = Input.GetMouseButton(0); bool touch = Input.GetKeyDown(KeyCode.Q); if (QTargetted) { if (Ab1 && !stoppingAttack && anythingWorks && QTargetted) { if (creepQ != null) { Qind2.SetActive(true); Qind2.transform.position = creepQ.transform.position - new Vector3(0, -1, 0); QPressed = true; } else { QTargetted = false; } } else if (QPressed || (leftClick && Ab1)) { Qind2.SetActive(false); QPressed = false; isInvisible = false; activateQ(); } else { Qind2.SetActive(false); QPressed = false; } if (Ab1 && endingAttack) { } if (touch) { anythingWorks = true; endingAttack = false; } } else { if (Ab1 && !stoppingAttack && anythingWorks) { QIndicator.SetActive(true); QPressed = true; } else if (QPressed || (leftClick && Ab1)) { QIndicator.SetActive(false); QPressed = false; isInvisible = false; activateQ(); } else { QIndicator.SetActive(false); QPressed = false; } if (Ab1 && endingAttack) { } if (touch) { anythingWorks = true; endingAttack = false; } } } }