改改改

重大bug修复:track删除pathnode后不能正确更新

Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2025-07-10 20:40:03 +08:00
parent 43fae3a34a
commit 135f61a857
24 changed files with 34730 additions and 21708 deletions

View File

@@ -66,7 +66,7 @@ namespace Ichni.RhythmGame
this.baseColorDirtyMark = false;
this.emissionColorDirtyMark = false;
if (!HaveSameSubmodule)
{
(attachedGameElement as IHaveColorSubmodule).colorSubmodule = this;
@@ -88,7 +88,7 @@ namespace Ichni.RhythmGame
this.baseColorDirtyMark = false;
this.emissionColorDirtyMark = false;
if (!HaveSameSubmodule)
{
(attachedGameElement as IHaveColorSubmodule).colorSubmodule = this;
@@ -106,15 +106,21 @@ namespace Ichni.RhythmGame
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Color");
var subcontainer = container.GenerateSubcontainer(1, 300f);
if ((attachedGameElement as IHaveColorSubmodule).haveBaseColor)
{
var baseColor = inspector.GenerateBaseColorPicker(this, subcontainer, "Base Color", nameof(originalBaseColor));
baseColor.AddListenerFunction(Refresh);
// var baseColor = inspector.GenerateBaseColorPicker(this, subcontainer, "Base Color", nameof(originalBaseColor));
// baseColor.AddListenerFunction(Refresh);
// 新增HSV轮盘
var hsvDrawer = inspector.GenerateHsvDrawer(this, subcontainer, "HSV", nameof(originalBaseColor));
hsvDrawer.AddListenerFunction(Refresh);
if (attachedGameElement.childElementList.Exists(x => x is BaseColorChange))
{
baseColor.title.text += " (Occupied by Animation)";
baseColor.canvasGroup.interactable = false;
// baseColor.title.text += " (Occupied by Animation)";
// baseColor.canvasGroup.interactable = false;
hsvDrawer.title.text += " (Occupied by Animation)";
hsvDrawer.canvasGroup.interactable = false;
}
}
@@ -123,7 +129,7 @@ namespace Ichni.RhythmGame
var emissionColor = inspector.GenerateEmissionColorPicker(this, subcontainer, "Emission Color",
nameof(emissionEnabled), nameof(originalEmissionColor), nameof(originalEmissionIntensity));
emissionColor.AddListenerFunction(Refresh);
if (attachedGameElement.childElementList.Exists(x => x is EmissionColorChange))
{
emissionColor.title.text += " (Occupied by Animation)";
@@ -147,7 +153,7 @@ namespace Ichni.RhythmGame
public ColorSubmodule colorSubmodule { get; set; }
public virtual bool haveBaseColor => true;
public virtual bool haveEmissionColor => false;
public void SetColorObserver()
{
GameElement attachedGameElement = colorSubmodule.attachedGameElement;
@@ -158,7 +164,7 @@ namespace Ichni.RhythmGame
{
return;
}
bool willRefresh = false;
if (colorSubmodule.baseColorDirtyMark)
@@ -167,14 +173,14 @@ namespace Ichni.RhythmGame
colorSubmodule.baseColorDirtyMark = false;
willRefresh = true;
}
if (colorSubmodule.emissionColorDirtyMark)
{
//在动画物体中改变currentColor
colorSubmodule.emissionColorDirtyMark = false;
willRefresh = true;
}
if (willRefresh)
{
attachedGameElement.Refresh();
@@ -209,13 +215,13 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
(attachedElement as IHaveColorSubmodule).colorSubmodule = new ColorSubmodule(attachedElement,
(attachedElement as IHaveColorSubmodule).colorSubmodule = new ColorSubmodule(attachedElement,
originalBaseColor, emissionEnabled, originalEmissionColor, originalEmissionIntensity);
}
public override void DuplicateBM(GameElement attached)
{
(attached as IHaveColorSubmodule).colorSubmodule = new ColorSubmodule(attached,
(attached as IHaveColorSubmodule).colorSubmodule = new ColorSubmodule(attached,
originalBaseColor, emissionEnabled, originalEmissionColor, originalEmissionIntensity);
}
}