fix for zhen
This commit is contained in:
parent
2799c4ffa3
commit
c76805b98a
|
@ -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;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.Assertions;
|
||||
|
||||
[RequireComponent(typeof(HealthComponent))]
|
||||
public abstract class Tower : MonoBehaviour
|
||||
{
|
||||
public bool towerSelected { get; set; } = true;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue