public Projectile(CombatUnit parent, Unit target, DamageEvent.DamageType type, float movementSpeed, int maxRange, int baseDamage) { this.parent = parent; this.x = parent.x; this.y = parent.y; this.startX = this.x; this.startY = this.y; this.target = target; this.type = type; this.movementSpeed = movementSpeed; this.maxRange = maxRange; this.baseDamage = baseDamage; this.waypoint = Util.GetPointOnCircle(parent.GetLocation(), maxRange, Util.GetHypoteneuseAngleDegrees(parent.GetLocation(), target.GetLocation())); int targetX = (int)target.x; int targetY = (int)target.y; SetMoveToTarget(targetX, targetY); }