57 lines
1.5 KiB
C#
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
|
|
}
|
|
|
|
} |