This commit is contained in:
SoulliesOfficial
2026-03-21 12:12:12 -04:00
parent a1b831ecbf
commit 7d3e8c2d5b
159 changed files with 4096 additions and 14430 deletions

View File

@@ -6,7 +6,7 @@ using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap
{
[System.Serializable]
public class DTMFramesFloor_BM : EnvironmentObject_BM
public class DTMRandomGridFloor_BM : EnvironmentObject_BM
{
public float patternSizeX = 100.0f;
public float patternSizeY = 100.0f;
@@ -22,7 +22,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap
public float outerBorderColorA = 1f;
public float outerBorderWidth = 0.02f;
public DTMFramesFloor_BM()
public DTMRandomGridFloor_BM()
{
}
@@ -31,7 +31,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap
{
Color outerColor = new Color(outerBorderColorR, outerBorderColorG, outerBorderColorB, outerBorderColorA);
matchedElement = DTMFramesFloor.GenerateElement(elementName, elementGuid, tags, false,
matchedElement = DTMRandomGridFloor.GenerateElement(elementName, elementGuid, tags, false,
themeBundleName, objectName, GetElement(attachedElementGuid), isStatic,
patternSizeX, patternSizeY, gridDensity,
timeAngle, stepA, stepB,

View File

@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using Ichni.RhythmGame.Beatmap;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap
{
[System.Serializable]
public class DTMRandomGridTube_BM : EnvironmentObject_BM
{
public float patternSizeX = 2.0f;
public float patternSizeY = 2.0f;
public float gridDensity = 1.0f;
public float timeAngle = 1.0f;
public float stepA = 0.293f;
public float stepB = 0.345f;
public float seamRotation = -90f;
public float seamFadeWidth = 0.2f;
public float seamFadeSmoothness = 1.0f;
public float fadeFar = 100f;
public float fadeNear = 20f;
public float tubeRadius = 10f;
public DTMRandomGridTube_BM()
{
}
public override void ExecuteBM()
{
matchedElement = DTMRandomGridTube.GenerateElement(elementName, elementGuid, tags, false,
themeBundleName, objectName, GetElement(attachedElementGuid), isStatic,
patternSizeX, patternSizeY, gridDensity, timeAngle,
stepA, stepB,
seamRotation, seamFadeWidth, seamFadeSmoothness,
fadeFar, fadeNear, tubeRadius);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 0b1b3eff87621e842975e045af403315

View File

@@ -5,7 +5,7 @@ using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public class DTMFramesFloor : EnvironmentObject
public class DTMRandomGridFloor : EnvironmentObject
{
#region [] Exposed Fields
public float patternSizeX;
@@ -23,7 +23,7 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
#endregion
#region [] Lifecycle & Factory
public static DTMFramesFloor GenerateElement(string elementName, Guid id, List<string> tags,
public static DTMRandomGridFloor GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement,
bool isStatic,
float patternSizeX, float patternSizeY, float gridDensity,
@@ -32,21 +32,21 @@ namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
Color outerBorderColor,
float outerBorderWidth)
{
DTMFramesFloor framesFloor = EnvironmentObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<DTMFramesFloor>();
DTMRandomGridFloor randomGridFloor = EnvironmentObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<DTMRandomGridFloor>();
framesFloor.patternSizeX = patternSizeX;
framesFloor.patternSizeY = patternSizeY;
framesFloor.gridDensity = gridDensity;
framesFloor.timeAngle = timeAngle;
framesFloor.stepA = stepA;
framesFloor.stepB = stepB;
randomGridFloor.patternSizeX = patternSizeX;
randomGridFloor.patternSizeY = patternSizeY;
randomGridFloor.gridDensity = gridDensity;
randomGridFloor.timeAngle = timeAngle;
randomGridFloor.stepA = stepA;
randomGridFloor.stepB = stepB;
framesFloor.enableOuterBorder = enableOuterBorder;
framesFloor.outerBorderColor = outerBorderColor;
framesFloor.outerBorderWidth = outerBorderWidth;
randomGridFloor.enableOuterBorder = enableOuterBorder;
randomGridFloor.outerBorderColor = outerBorderColor;
randomGridFloor.outerBorderWidth = outerBorderWidth;
return framesFloor;
return randomGridFloor;
}
public override void FirstSetUpObject(bool isFirstGenerated)

View File

@@ -0,0 +1,117 @@
using System;
using System.Collections.Generic;
using Ichni.RhythmGame.Beatmap;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public class DTMRandomGridTube : EnvironmentObject
{
#region [] Exposed Fields
public float patternSizeX = 2.0f;
public float patternSizeY = 2.0f;
public float gridDensity = 1.0f;
public float timeAngle = 1.0f;
public float stepA = 0.293f;
public float stepB = 0.345f;
public float seamRotation = -90f;
public float seamFadeWidth = 0.2f;
public float seamFadeSmoothness = 1.0f;
public float fadeFar = 100f;
public float fadeNear = 20f;
public float tubeRadius = 10f;
public Renderer meshRenderer;
#endregion
#region [] Lifecycle & Factory
public static DTMRandomGridTube GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement,
bool isStatic,
float patternSizeX, float patternSizeY, float gridDensity,
float timeAngle, float stepA, float stepB,
float seamRotation, float seamFadeWidth, float seamFadeSmoothness,
float fadeFar, float fadeNear, float tubeRadius)
{
DTMRandomGridTube randomGridTube = EnvironmentObject.GenerateElement(elementName, id, tags,
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<DTMRandomGridTube>();
randomGridTube.patternSizeX = patternSizeX;
randomGridTube.patternSizeY = patternSizeY;
randomGridTube.gridDensity = gridDensity;
randomGridTube.timeAngle = timeAngle;
randomGridTube.stepA = stepA;
randomGridTube.stepB = stepB;
randomGridTube.seamRotation = seamRotation;
randomGridTube.seamFadeWidth = seamFadeWidth;
randomGridTube.seamFadeSmoothness = seamFadeSmoothness;
randomGridTube.fadeFar = fadeFar;
randomGridTube.fadeNear = fadeNear;
randomGridTube.tubeRadius = tubeRadius;
return randomGridTube;
}
public override void FirstSetUpObject(bool isFirstGenerated)
{
if (meshRenderer == null)
meshRenderer = GetComponentInChildren<Renderer>();
if (meshRenderer != null)
{
meshRenderer.InitializeShader(); // 实例化材质 / Instantiate material
UpdateMaterialProperties();
}
}
public override void OnDirtyRefresh(Dictionary<string, bool> flags)
{
UpdateMaterialProperties();
}
#endregion
#region [] Core Effect Logic
public void UpdateMaterialProperties()
{
if (meshRenderer != null && meshRenderer.material != null)
{
Material mat = meshRenderer.material;
mat.SetVector("_PatternSize", new Vector4(patternSizeX, patternSizeY, 0, 0));
mat.SetFloat("_GridDensity", gridDensity);
mat.SetFloat("_TimeAngle", timeAngle);
mat.SetFloat("_StepA", stepA);
mat.SetFloat("_StepB", stepB);
mat.SetFloat("_SeamRotation", seamRotation);
mat.SetFloat("_SeamFadeWidth", seamFadeWidth);
mat.SetFloat("_SeamFadeSmoothness", seamFadeSmoothness);
mat.SetFloat("_FadeFar", fadeFar);
mat.SetFloat("_FadeNear", fadeNear);
mat.SetFloat("_TubeRadius", tubeRadius);
// Sync color mapped from unified generic submodule
mat.SetColor("_Color0", colorSubmodule.currentBaseColor);
}
}
public override void Refresh()
{
base.Refresh();
// Sync environment color changes
if (meshRenderer != null && meshRenderer.material != null)
{
meshRenderer.material.SetColor("_Color0", colorSubmodule.currentBaseColor);
}
}
#endregion
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f853de2eedbaded4489d7b898fef5926