protected override void OnCast() { HealingCircle healingCircle = Instantiate(healingCirclePrefab, transform.position, transform.rotation).GetComponent <HealingCircle>(); healingCircle.Activate(healingCircleDuration, healingCirclePower); StartCooldown(); }
protected override void OnUpdate() { if (isSelecting) { Vector3 screenPos = Input.mousePosition; Vector2 worldpos = mainCamera.ScreenToWorldPoint(screenPos); healingCircle.transform.position = worldpos; if (Input.GetMouseButtonDown(0)) { healingCircle.Activate(healingCircleDuration, healingCirclePower); isSelecting = false; IsLocked = false; StartCooldown(); } else if (Input.GetMouseButtonDown(1)) { Destroy(healingCircle.gameObject); isSelecting = false; IsLocked = false; } } }