Exemplo n.º 1
0
    protected override void OnCast()
    {
        HealingCircle healingCircle = Instantiate(healingCirclePrefab, transform.position, transform.rotation).GetComponent <HealingCircle>();

        healingCircle.Activate(healingCircleDuration, healingCirclePower);
        StartCooldown();
    }
Exemplo n.º 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;
            }
        }
    }