@@ -81,6 +81,7 @@ namespace Ichni.Editor
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public CompositeParameterWindow SetAsFloatList()
|
||||
{
|
||||
void GenerateUnit(float content)
|
||||
@@ -112,7 +113,7 @@ namespace Ichni.Editor
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public Button GotoGraphicalAnimationEditorButton;
|
||||
public CompositeParameterWindow SetAsFlexibleFloat()
|
||||
{
|
||||
void GenerateUnit(AnimatedFloat content)
|
||||
@@ -147,6 +148,16 @@ namespace Ichni.Editor
|
||||
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, newFlexibleFloat);
|
||||
};
|
||||
|
||||
GotoGraphicalAnimationEditorButton.gameObject.SetActive(true); // 隐藏按钮
|
||||
GotoGraphicalAnimationEditorButton.onClick.AddListener(() =>
|
||||
{
|
||||
// 打开Graphical Animation Editor
|
||||
IHaveInspection i = EditorManager.instance.uiManager.inspector as IHaveInspection;
|
||||
i.GenerateGraphicalFlexibleFloatWindow(connectedBaseElement, "Graphical Animation Editor", new FlexibleFloat[] { flexibleFloat }, new string[] { "1" });
|
||||
|
||||
|
||||
|
||||
});
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -140,6 +140,7 @@ namespace Ichni.Editor
|
||||
public RectTransform moveTabPoint;
|
||||
public void Elementfind(GameElement element)
|
||||
{
|
||||
if (element == null) return;
|
||||
foreach (var i in element.childElementList)
|
||||
{
|
||||
if (i is NoteBase)
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
var baseColor = inspector.GenerateBaseColorPicker(this, subcontainer, "Base Color", nameof(originalBaseColor));
|
||||
baseColor.AddListenerFunction(Refresh);
|
||||
// 新增:HSV轮盘
|
||||
// // 新增:HSV轮盘
|
||||
var hsvDrawer = inspector.GenerateHsvDrawer(this, subcontainer, "HSV", nameof(originalBaseColor));
|
||||
hsvDrawer.AddListenerFunction(Refresh);
|
||||
baseColor.hsvDrawer = hsvDrawer;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Ichni.RhythmGame
|
||||
public EffectSubmodule effectSubmodule { get; set; }
|
||||
public float time; //触发效果的时间
|
||||
|
||||
public static TimeEffectsCollection GenerateElement(string name, Guid guid, List<string> tags,
|
||||
public static TimeEffectsCollection GenerateElement(string name, Guid guid, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement, float time)
|
||||
{
|
||||
TimeEffectsCollection timeEffectsCollection = Instantiate(EditorManager.instance.basePrefabs.emptyObject)
|
||||
@@ -41,14 +41,14 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new TimeEffectsCollection_BM(elementName, elementGuid, tags,
|
||||
matchedBM = new TimeEffectsCollection_BM(elementName, elementGuid, tags,
|
||||
parentElement.matchedBM as GameElement_BM, this);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
base.SetUpInspector();
|
||||
|
||||
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Time Effects Collection");
|
||||
@@ -65,26 +65,26 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public TimeEffectsCollection_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public TimeEffectsCollection_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, TimeEffectsCollection timeEffectsCollection)
|
||||
|
||||
public TimeEffectsCollection_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM attachedElement, TimeEffectsCollection timeEffectsCollection)
|
||||
: base(elementName, elementGuid, tags, attachedElement)
|
||||
{
|
||||
time = timeEffectsCollection.time;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = TimeEffectsCollection.GenerateElement(elementName, elementGuid,
|
||||
matchedElement = TimeEffectsCollection.GenerateElement(elementName, Guid.NewGuid(),
|
||||
tags, false, GetElement(attachedElementGuid), time);
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement attached)
|
||||
{
|
||||
return TimeEffectsCollection.GenerateElement(elementName, elementGuid,
|
||||
return TimeEffectsCollection.GenerateElement(elementName, Guid.NewGuid(),
|
||||
tags, false, attached, time);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,10 +240,11 @@ namespace Ichni.RhythmGame
|
||||
|
||||
private void SetParticleRotation()
|
||||
{
|
||||
Vector3 vector3Rotation = particleRotation * Mathf.Deg2Rad;
|
||||
var mainModule = particle.main;
|
||||
mainModule.startRotationX = particleRotation.x;
|
||||
mainModule.startRotationY = particleRotation.y;
|
||||
mainModule.startRotationZ = particleRotation.z;
|
||||
mainModule.startRotationX = vector3Rotation.x;
|
||||
mainModule.startRotationY = vector3Rotation.y;
|
||||
mainModule.startRotationZ = vector3Rotation.z;
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Ichni.RhythmGame
|
||||
set => visibleTimeLength = value;
|
||||
}
|
||||
public bool emissionEnabled = false;
|
||||
public float emissionIntensity = 1f; // 发光强度
|
||||
// public float emissionIntensity = 1f; // 发光强度
|
||||
|
||||
|
||||
|
||||
@@ -169,22 +169,7 @@ namespace Ichni.RhythmGame
|
||||
gradientWindow.SetAsGradientAlphaKeys();
|
||||
gradientWindow.closeButton.onClick.AddListener(() => trailRenderer.colorGradient = gradient);
|
||||
});
|
||||
var emissionSettings = container.GenerateSubcontainer(3);
|
||||
var emissionToggle = inspector.GenerateToggle(this, emissionSettings, "Emission Enabled", nameof(emissionEnabled))
|
||||
.AddListenerFunction(() =>
|
||||
{
|
||||
if (emissionEnabled)
|
||||
{
|
||||
trailRenderer.material.EnableKeyword("_EMISSION_ON");
|
||||
}
|
||||
else
|
||||
{
|
||||
trailRenderer.material.DisableKeyword("_EMISSION_ON");
|
||||
}
|
||||
}
|
||||
);
|
||||
var emissionIntensityInputField = inspector.GenerateInputField(this, emissionSettings, "Emission Intensity", nameof(emissionIntensity))
|
||||
.AddListenerFunction(() => trailRenderer.material.SetFloat("_EmissionIntensity", emissionIntensity));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ public class FlexibleFloatTab : MonoBehaviour
|
||||
{
|
||||
AddEvent();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 添加事件
|
||||
|
||||
@@ -59,6 +59,7 @@ public partial class GraphicalFlexibleFloatWindow : MovableWindow
|
||||
};
|
||||
XDeviverScale("1");
|
||||
EvEndpointChangeButton.onClick.AddListener(EvEndpointStartChange);
|
||||
GetComponent<RectTransform>().sizeDelta = new Vector2(1400, (FlexibleFloats.Length + 1) * 200 + 50);
|
||||
}
|
||||
public void AddUnit(FlexibleFloat flexibleFloat, string Subtitle)
|
||||
{
|
||||
@@ -196,6 +197,7 @@ public partial class GraphicalFlexibleFloatWindow
|
||||
|
||||
public void Update()
|
||||
{
|
||||
|
||||
if (Keyboard.current.deleteKey.isPressed && ConnectedPoint != null)
|
||||
{
|
||||
RemoveConnectedPoint();
|
||||
@@ -219,6 +221,23 @@ public partial class GraphicalFlexibleFloatWindow
|
||||
}
|
||||
}
|
||||
}
|
||||
if (RectTransformUtility.RectangleContainsScreenPoint(GetComponent<RectTransform>(), Mouse.current.position.ReadValue()))
|
||||
{
|
||||
if (Keyboard.current.aKey.wasPressedThisFrame)
|
||||
{
|
||||
if (ConnectedPoint != null)
|
||||
{
|
||||
ConnectedPoint.animatedFloat.endValue *= -1;
|
||||
ConnectedPoint.animatedFloat.startValue *= -1;
|
||||
|
||||
ConnectedPoint.ReDraw(scalevalue);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void PasteClipboard()
|
||||
|
||||
@@ -49,7 +49,6 @@ public partial class HsvDrawer
|
||||
{
|
||||
alphaSlider.minValue = 0f;
|
||||
alphaSlider.maxValue = 1f;
|
||||
alphaSlider.value = 1f;
|
||||
alphaSlider.onValueChanged.AddListener(OnAlphaSliderChanged);
|
||||
}
|
||||
if (previewImage != null)
|
||||
|
||||
Reference in New Issue
Block a user