DTM Trail

This commit is contained in:
SoulliesOfficial
2025-04-09 17:54:29 -04:00
parent d4e51999b1
commit 3dbfd6bf62
51 changed files with 47522 additions and 924 deletions

View File

@@ -65,6 +65,11 @@ namespace Ichni.RhythmGame
// }
//
public interface IHaveInteraction
{
public void TriggerInteraction();
}
namespace Beatmap
{

View File

@@ -61,11 +61,21 @@ namespace Ichni.RhythmGame
/// <returns>返回距离当前时间最近的前一个AnimatedBool</returns>
AnimatedBool GetAnimatedBool(float nowTime)
{
if (nowTime < animations[0].time)
{
return animations[0];
}
if (nowTime > animations[animations.Count - 1].time)
{
return animations[animations.Count - 1];
}
for (int i = 0; i < animations.Count; i++)
{
if (nowTime >= animations[i].time)
if (nowTime < animations[i].time)
{
return animations[i];
return animations[i - 1];
}
}

View File

@@ -24,6 +24,14 @@ namespace Ichni.RhythmGame
public bool baseColorDirtyMark;
public bool emissionColorDirtyMark;
public Color GetCurrentEmissionColor()
{
float intensity = Mathf.Pow(2, currentEmissionIntensity);
Color emissionColor = currentEmissionColor * intensity;
emissionColor.a = 1;
return emissionColor;
}
public ColorSubmodule(GameElement attachedGameElement) : base(attachedGameElement)
{
this.originalBaseColor = Color.white;
@@ -117,6 +125,7 @@ namespace Ichni.RhythmGame
{
currentBaseColor = originalBaseColor;
currentEmissionColor = originalEmissionColor;
currentEmissionIntensity = originalEmissionIntensity;
baseColorDirtyMark = true;
emissionColorDirtyMark = true;
}
@@ -125,7 +134,7 @@ namespace Ichni.RhythmGame
public interface IHaveColorSubmodule
{
public ColorSubmodule colorSubmodule { get; set; }
public bool haveEmission { get; }
public bool haveEmission => false;
public void SetColorObserver()
{

View File

@@ -16,8 +16,8 @@ namespace Ichni.RhythmGame
public TimeDurationSubmodule(GameElement attachedGameElement) : base(attachedGameElement)
{
isOverridingDuration = false;
startTime = -EditorManager.instance.songInformation.delay;//TODO: 换为-delay
endTime = EditorManager.instance.songInformation.songTime;//TODO: 换为songLength
startTime = -32767;//TODO: 换为-delay
endTime = 32767;//TODO: 换为songLength
(attachedGameElement as IHaveTimeDurationSubmodule).timeDurationSubmodule = this;
}