예제 #1
0
    protected override void OnCast()
    {
        HealingCircle healingCircle = Instantiate(healingCirclePrefab, transform.position, transform.rotation).GetComponent <HealingCircle>();

        healingCircle.Activate(healingCircleDuration, healingCirclePower);
        StartCooldown();
    }
예제 #2
0
    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;
            }
        }
    }