switching up some more clicking

This commit is contained in:
2026-06-25 18:11:43 -04:00
parent 37da9a4e84
commit fc32baa071
9 changed files with 57 additions and 58 deletions
+4 -3
View File
@@ -3,9 +3,9 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
public partial class Tower : Sprite2D
public partial class Tower : HoverableNode
{
public bool _hovered, _aiming;
public bool _aiming;
public int _launchSpeed = 1000, _arcIterations = 50;
public Vector2 _aimOffset, _arcEnd;
public List<Vector2> _arc = new();
@@ -16,9 +16,9 @@ public partial class Tower : Sprite2D
{
base._Ready();
_area = GetNode<Area2D>("Area");
_offset = GetNode<Marker2D>("Offset");
_attackSpawn = GetNode<Marker2D>("AttackSpawn");
// Click += HandleClick;
}
public override void _Process(double delta)
{
@@ -56,6 +56,7 @@ public partial class Tower : Sprite2D
}
}
}
}
public float CalculateLaunchAngle(Vector2 START, Vector2 END, int MAX_ITERATIONS = 20)