奇怪的调

This commit is contained in:
2025-06-14 20:47:45 +08:00
parent 970ee90a8b
commit 338ae9bddd
22 changed files with 20470 additions and 2681 deletions

View File

@@ -15,7 +15,7 @@ namespace Ichni.RhythmGame
public static EnvironmentObject GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement, bool isStatic)
{
EnvironmentObject environmentObject =
EnvironmentObject environmentObject =
SubstantialObject.GenerateElement(elementName, id, tags, isFirstGenerated, themeBundleName, objectName, parentElement)
.GetComponent<EnvironmentObject>();
@@ -30,34 +30,26 @@ namespace Ichni.RhythmGame
{
public override void SaveBM()
{
matchedBM = new EnvironmentObject_BM(elementName, elementGuid, tags,
matchedBM = new EnvironmentObject_BM(elementName, elementGuid, tags,
parentElement.matchedBM as GameElement_BM, themeBundleName, objectName, isStatic);
}
public override void SetUpInspector()
{
base.SetUpInspector();
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Generate");
var objectSettings = container.GenerateSubcontainer(3);
var environmentObjectButton = inspector.GenerateButton(this, objectSettings, "Environment Object",
() => TemporaryObject.GenerateElement("New Environment Object", Guid.NewGuid(), new List<string>(),
true, this));
var isStaticToggle = inspector.GenerateToggle(this, objectSettings, "Is Static", nameof(isStatic))
.AddListenerFunction(() => gameObject.isStatic = isStatic);
StandardInspectionElement.GenerateForTransform(this, container); //关于有Transform的元素
var generateAnimation = container.GenerateSubcontainer(3);
var generateDisplacementButton = inspector.GenerateButton(this, generateAnimation, "Displacement",
() => Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var generateSwirlButton = inspector.GenerateButton(this, generateAnimation, "Swirl",
() => Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var generateScaleButton = inspector.GenerateButton(this, generateAnimation, "Scale",
() => Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var generateBaseColorChangeButton = inspector.GenerateButton(this, generateAnimation, "Base Color Change",
() => BaseColorChange.GenerateElement("New Base Color Change", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
@@ -67,7 +59,7 @@ namespace Ichni.RhythmGame
() => EmissionColorChange.GenerateElement("New Emission Color Change", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
}
}
}
@@ -92,12 +84,12 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
matchedElement = EnvironmentObject.GenerateElement(elementName, elementGuid, tags, false,
themeBundleName, objectName,GetElement(attachedElementGuid), isStatic);
themeBundleName, objectName, GetElement(attachedElementGuid), isStatic);
}
public override GameElement DuplicateBM(GameElement parent)
{
return EnvironmentObject.GenerateElement(elementName, Guid.NewGuid(), tags, false,
return EnvironmentObject.GenerateElement(elementName, Guid.NewGuid(), tags, false,
themeBundleName, objectName, parent, isStatic);
}
}