mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 17:30:10 +00:00
3.0 - unitypackage
This commit is contained in:
24
Runtime/Component/Vessel/VesselHandler.cs
Normal file
24
Runtime/Component/Vessel/VesselHandler.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[UnityEngine.Scripting.Preserve]
|
||||
internal sealed class VesselHandler : MainComponentHandler<Vessel>
|
||||
{
|
||||
public override void Update()
|
||||
{
|
||||
if (chart.isPointerInChart)
|
||||
{
|
||||
component.context.isPointerEnter = false;
|
||||
return;
|
||||
}
|
||||
var vessel = component;
|
||||
vessel.context.isPointerEnter = vessel.show
|
||||
&& Vector3.Distance(vessel.context.center, chart.pointerPos) <= vessel.context.radius;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user