示例#1
0
    void CheckForCast()
    {
        if (isTargeting && Input.GetKeyDown(KeyCode.Mouse0))
        {
            Vector2 targetPos = CursorManager.instance.GetWorldSpacePosition();

            if (IsDistanceValid(transform.position, targetPos, activeSpell.range))
            {
                activeSpell.Cast(this);
                EndCast();
            }
        }
    }
示例#2
0
 public void Cast(Transform t)
 {
     so.Cast(t);
 }