Files
ichni_Official/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/NoteJudgeUnit.cs
SoulliesOfficial 7580c4d87c 大更
2026-03-14 03:13:10 -04:00

57 lines
1.5 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 bool CheckJudgeAvailability(InputUnit inputUnit)
{
throw new NotImplementedException();
}
#endregion
#region [] Data Mapping
#endregion
}
}