72 lines
1.8 KiB
C#
72 lines
1.8 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
|
|
{
|
|
public NoteBase note;
|
|
public bool isShowingJudge;
|
|
|
|
public RectTransform judgeHintImage;
|
|
protected abstract GameObject GetHintImagePrefab();
|
|
|
|
public BaseElement_BM matchedBM { get; set; }
|
|
|
|
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 != null)
|
|
{
|
|
Object.Destroy(judgeHintImage.gameObject);
|
|
}
|
|
}
|
|
|
|
public virtual void UpdateJudge()
|
|
{
|
|
|
|
}
|
|
|
|
public virtual bool CheckJudgeAvailability(InputUnit inputUnit)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 转换为存档类
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public abstract NoteJudgeUnit_BM ConvertToBM();
|
|
}
|
|
|
|
namespace Beatmap
|
|
{
|
|
public abstract class NoteJudgeUnit_BM
|
|
{
|
|
public NoteJudgeUnit_BM()
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 转换为游戏类
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public abstract NoteJudgeUnit ConvertToGameType(NoteBase attachedGameElement);
|
|
}
|
|
}
|
|
} |