Files
ichni_Official/Assets/Scripts/Game/GameElements/Notes/JudgeSubmodules/NoteJudgeUnit.cs

57 lines
1.5 KiB
C#
Raw Normal View History

2025-06-03 02:42:28 -04:00
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
{
2026-03-14 03:13:10 -04:00
#region [] Properties
2025-06-03 02:42:28 -04:00
public NoteBase note;
public bool isShowingJudge;
public RectTransform judgeHintImage;
public BaseElement_BM matchedBM { get; set; }
2026-03-14 03:13:10 -04:00
#endregion
#region [] Virtual & Abstract Methods
protected abstract GameObject GetHintImagePrefab();
2025-06-03 02:42:28 -04:00
protected NoteJudgeUnit(NoteBase note)
{
this.note = note;
}
public virtual void SetShowingJudge(bool isShowing)
{
isShowingJudge = isShowing;
if (isShowing)
{
judgeHintImage = Object.Instantiate(GetHintImagePrefab(),
2026-03-14 03:13:10 -04:00
GameManager.Instance.judgeHintCanvas.transform).GetComponent<RectTransform>();
2025-06-03 02:42:28 -04:00
}
2025-07-21 05:42:20 -04:00
else if (judgeHintImage is not null)
2025-06-03 02:42:28 -04:00
{
Object.Destroy(judgeHintImage.gameObject);
}
}
public virtual void UpdateJudge()
{
}
public virtual bool CheckJudgeAvailability(InputUnit inputUnit)
{
throw new NotImplementedException();
}
2026-03-14 03:13:10 -04:00
#endregion
2025-06-03 02:42:28 -04:00
2026-03-14 03:13:10 -04:00
#region [] Data Mapping
#endregion
2025-06-03 02:42:28 -04:00
}
}