Files
ichni_Official/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/NoteJudgeUnit.cs
SoulliesOfficial 96619b1bb5 谱面替换
2026-07-30 09:28:43 -04:00

66 lines
1.6 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame.Beatmap;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Ichni.RhythmGame
{
public abstract class NoteJudgeUnit : IBaseElement
{
#region [] Properties
public NoteBase note;
public bool isShowingJudge;
public RectTransform judgeHintImage;
public BaseElement_BM matchedBM { get; set; }
#endregion
#region [] Virtual & Abstract Methods
protected abstract GameObject GetHintImagePrefab();
protected NoteJudgeUnit(NoteBase note)
{
this.note = note;
}
public virtual void SetShowingJudge(bool isShowing)
{
isShowingJudge = isShowing;
if (isShowing)
{
judgeHintImage = Object.Instantiate(GetHintImagePrefab(),
GameManager.Instance.judgeHintCanvas.transform).GetComponent<RectTransform>();
}
else if (judgeHintImage is not null)
{
Object.Destroy(judgeHintImage.gameObject);
}
}
public virtual void UpdateJudge()
{
}
public virtual void UpdateSpatialState(float songTime, Vector2 screenPosition)
{
}
public virtual void ResetSpatialState()
{
}
public virtual bool CheckJudgeAvailability(InputJudgeContext context)
{
throw new NotImplementedException();
}
#endregion
#region [] Data Mapping
#endregion
}
}