fix for zhen

This commit is contained in:
Sveske Juice 2024-04-20 17:24:49 +02:00
parent 2799c4ffa3
commit c76805b98a
3 changed files with 2 additions and 3 deletions

View File

@ -4,7 +4,6 @@ using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Assertions;
[RequireComponent(typeof(ProjectileSpawner))]
public class ProjectileTower : Tower
{
[SerializeField, Range(0.01f, 20f)] private float attackSecondsDelay = 1f;

View File

@ -1,7 +1,6 @@
using UnityEngine;
using UnityEngine.Assertions;
[RequireComponent(typeof(HealthComponent))]
public abstract class Tower : MonoBehaviour
{
public bool towerSelected { get; set; } = true;

View File

@ -72,11 +72,12 @@ public class EditableArc : MonoBehaviour
Vector3 v1 = SamplePointOnArcAngle(start, end, visualRadius, Value.Value);
Vector3 v2 = SamplePointOnArcAngle(start, end, visualRadius, Value.Value + 0.01f);
Vector3 arcTangent = v2 - v1;
Debug.DrawRay(knob.transform.position, arcTangent, Color.yellow, 5f);
// TODO: figure out this based on camera orientation
float sign = -1f;
float delta = Vector2.Dot(arcTangent, Vector2.down * mouseMovement) * knobSensitiviy;
float delta = (Vector2.Dot(arcTangent, Vector2.up * mouseMovement.x) + Vector2.Dot(arcTangent, Vector2.right * mouseMovement.y)) * knobSensitiviy;
Debug.Log(delta);
float newAngle = ClampAngle(Value.Value + delta, rotationMinMax.x, rotationMinMax.y);
Value.Value = newAngle;