43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Ichni.RhythmGame.Beatmap;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.RhythmGame
|
|
{
|
|
public class FullScreenNearTimeJudgeUnit : NoteJudgeUnit
|
|
{
|
|
#region [初始化] Initialization
|
|
public FullScreenNearTimeJudgeUnit(NoteBase note) : base(note)
|
|
{
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region [判定逻辑覆盖] Judge Overrides
|
|
protected override GameObject GetHintImagePrefab() => GameManager.Instance.basePrefabs.fullscreenNearTimeHint;
|
|
|
|
public override void UpdateJudge()
|
|
{
|
|
Vector2 noteScreenPosition = note.noteScreenPosition;
|
|
RectTransform canvasRect = GameManager.Instance.judgeHintCanvas.GetComponent<RectTransform>();
|
|
if (RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRect, noteScreenPosition, null, out Vector2 uiPosition))
|
|
{
|
|
judgeHintImage.anchoredPosition = uiPosition;
|
|
}
|
|
}
|
|
|
|
public override bool CheckJudgeAvailability(InputUnit inputUnit)
|
|
{
|
|
if (inputUnit is InputUnitSwipe swipe && note is Flick flick)
|
|
{
|
|
return flick.CheckSwipeDirection(swipe);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
|
|
} |