@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
@@ -49,9 +50,11 @@ namespace Ichni.RhythmGame
|
||||
var bloomPeakField = inspector.GenerateInputField(this, effectSettings, "Bloom Peak", nameof(peak));
|
||||
var intensityCurveButton = inspector.GenerateButton(this, effectSettings, "Intensity Curve", () =>
|
||||
{
|
||||
var intensityCurveWindow =
|
||||
var intensityCurveWindow =
|
||||
inspector.GenerateCompositeParameterWindow(this, "Intensity Curve", nameof(intensityCurve)).SetAsCustomCurve();
|
||||
});
|
||||
SetRemove(effectSettings);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,12 +65,12 @@ namespace Ichni.RhythmGame
|
||||
public float duration;
|
||||
public float peak;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
|
||||
public BloomEffect_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public BloomEffect_BM(float duration, float peak, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -75,7 +78,7 @@ namespace Ichni.RhythmGame
|
||||
this.peak = peak;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new BloomEffect(duration, peak, intensityCurve)
|
||||
|
||||
@@ -14,10 +14,10 @@ namespace Ichni.RhythmGame
|
||||
public float duration;
|
||||
public Vector3 offsetValue;
|
||||
public AnimationCurve offsetCurve;
|
||||
|
||||
|
||||
Transform gameCameraTransform => EditorManager.instance.cameraManager.gameCamera.gameCamera.transform;
|
||||
Tweener offsetTweener;
|
||||
|
||||
|
||||
public CameraOffsetEffect(float duration, Vector3 offsetValue, AnimationCurve offsetCurve)
|
||||
{
|
||||
this.effectTime = this.duration;
|
||||
@@ -25,7 +25,7 @@ namespace Ichni.RhythmGame
|
||||
this.offsetValue = offsetValue;
|
||||
this.offsetCurve = offsetCurve;
|
||||
}
|
||||
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
if (!EditorManager.instance.cameraManager.haveGameCamera)
|
||||
@@ -44,7 +44,7 @@ namespace Ichni.RhythmGame
|
||||
LogWindow.Log("No game camera found, cannot apply camera tilt effect.", Color.yellow);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//GameCamera的摄像机本体,能且只能被TiltEffect和OffsetEffect修改Transform!并且必须归位!
|
||||
offsetTweener = gameCameraTransform.DOBlendableLocalMoveBy(offsetValue, duration).SetEase(offsetCurve);
|
||||
}
|
||||
@@ -62,11 +62,13 @@ namespace Ichni.RhythmGame
|
||||
var durationField = inspector.GenerateInputField(this, subcontainer1, "Duration", nameof(duration));
|
||||
var curveButton = inspector.GenerateButton(this, subcontainer1, "Offset Curve", () =>
|
||||
{
|
||||
var intensityCurveWindow =
|
||||
var intensityCurveWindow =
|
||||
inspector.GenerateCompositeParameterWindow(this, "Offset Curve", nameof(offsetCurve)).SetAsCustomCurve();
|
||||
});
|
||||
var subcontainer2 = container.GenerateSubcontainer(1);
|
||||
var offsetPeakField = inspector.GenerateVector3InputField(this, subcontainer2, "Offset Value", nameof(offsetValue));
|
||||
|
||||
SetRemove(subcontainer2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Ichni.RhythmGame
|
||||
public float amplitudeX;
|
||||
public float amplitudeY;
|
||||
public float amplitudeZ;
|
||||
|
||||
|
||||
public CameraShakeEffect(float duration, float frequency, float amplitudeX, float amplitudeY, float amplitudeZ)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -26,7 +26,7 @@ namespace Ichni.RhythmGame
|
||||
this.amplitudeY = amplitudeY;
|
||||
this.amplitudeZ = amplitudeZ;
|
||||
}
|
||||
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.cameraShakeEffect).GetComponent<MMF_Player>();
|
||||
@@ -38,7 +38,7 @@ namespace Ichni.RhythmGame
|
||||
effect.PlayFeedbacks();
|
||||
LeanPool.Despawn(effect.gameObject, duration);
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new CameraShakeEffect_BM(duration, frequency, amplitudeX, amplitudeY, amplitudeZ);
|
||||
@@ -54,6 +54,7 @@ namespace Ichni.RhythmGame
|
||||
var amplitudeXInputField = inspector.GenerateInputField(this, effectSettings, "Amplitude X", nameof(amplitudeX));
|
||||
var amplitudeYInputField = inspector.GenerateInputField(this, effectSettings, "Amplitude Y", nameof(amplitudeY));
|
||||
var amplitudeZInputField = inspector.GenerateInputField(this, effectSettings, "Amplitude Z", nameof(amplitudeZ));
|
||||
SetRemove(effectSettings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,12 +67,12 @@ namespace Ichni.RhythmGame
|
||||
public float amplitudeX;
|
||||
public float amplitudeY;
|
||||
public float amplitudeZ;
|
||||
|
||||
|
||||
public CameraShakeEffect_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public CameraShakeEffect_BM(float duration, float frequency, float amplitudeX, float amplitudeY, float amplitudeZ)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace Ichni.RhythmGame
|
||||
public float duration;
|
||||
public Vector3 tiltValue;
|
||||
public AnimationCurve tiltCurve;
|
||||
|
||||
|
||||
Transform gameCameraTransform => EditorManager.instance.cameraManager.gameCamera.gameCamera.transform;
|
||||
Tweener tiltTweener;
|
||||
|
||||
|
||||
public CameraTiltEffect(float duration, Vector3 tiltValue, AnimationCurve tiltCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
@@ -45,16 +45,16 @@ namespace Ichni.RhythmGame
|
||||
LogWindow.Log("No game camera found, cannot apply camera tilt effect.", Color.yellow);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//GameCamera的摄像机本体,能且只能被TiltEffect和OffsetEffect修改Transform!并且必须归位!
|
||||
tiltTweener = gameCameraTransform.DOBlendableLocalRotateBy(tiltValue, duration, RotateMode.FastBeyond360).SetEase(tiltCurve);
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new CameraTiltEffect_BM(duration, tiltValue, tiltCurve);
|
||||
@@ -70,17 +70,18 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Camera Tilt");
|
||||
|
||||
|
||||
var subcontainer1 = container.GenerateSubcontainer(3);
|
||||
var durationField = inspector.GenerateInputField(this, subcontainer1, "Duration", nameof(duration));
|
||||
var tiltCurveButton = inspector.GenerateButton(this, subcontainer1, "Tilt Curve", () =>
|
||||
{
|
||||
var intensityCurveWindow =
|
||||
var intensityCurveWindow =
|
||||
inspector.GenerateCompositeParameterWindow(this, "Tilt Curve", nameof(tiltCurve)).SetAsCustomCurve();
|
||||
});
|
||||
|
||||
|
||||
var subcontainer2 = container.GenerateSubcontainer(1);
|
||||
var tiltValueField = inspector.GenerateVector3InputField(this, subcontainer2, "Tilt Value", nameof(tiltValue));
|
||||
SetRemove(subcontainer2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,14 +92,14 @@ namespace Ichni.RhythmGame
|
||||
public float duration;
|
||||
public Vector3 tiltValue;
|
||||
public AnimationCurve tiltCurve;
|
||||
|
||||
|
||||
public CameraTiltEffect_BM(float duration, Vector3 tiltValue, AnimationCurve tiltCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.tiltValue = tiltValue;
|
||||
this.tiltCurve = tiltCurve;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
|
||||
@@ -13,9 +13,9 @@ namespace Ichni.RhythmGame
|
||||
public float duration;
|
||||
public float relativeZoom;
|
||||
public AnimationCurve zoomCurve;
|
||||
|
||||
|
||||
Camera gameCamera => EditorManager.instance.cameraManager.gameCamera.gameCamera;
|
||||
|
||||
|
||||
public CameraZoomEffect(float duration, float relativeZoom, AnimationCurve zoomCurve)
|
||||
{
|
||||
this.effectTime = 0f;
|
||||
@@ -23,7 +23,7 @@ namespace Ichni.RhythmGame
|
||||
this.relativeZoom = relativeZoom;
|
||||
this.zoomCurve = zoomCurve;
|
||||
}
|
||||
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.cameraZoomEffect).GetComponent<MMF_Player>();
|
||||
@@ -48,9 +48,10 @@ namespace Ichni.RhythmGame
|
||||
var relativeZoomInputField = inspector.GenerateInputField(this, effectSettings, "Relative Zoom", nameof(relativeZoom));
|
||||
var zoomCurveButton = inspector.GenerateButton(this, effectSettings, "Intensity Curve", () =>
|
||||
{
|
||||
var zoomCurveWindow =
|
||||
var zoomCurveWindow =
|
||||
inspector.GenerateCompositeParameterWindow(this, "Intensity Curve", nameof(zoomCurve)).SetAsCustomCurve();
|
||||
});
|
||||
SetRemove(effectSettings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,16 +65,16 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public CameraZoomEffect_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public CameraZoomEffect_BM(float duration, float relativeZoom, AnimationCurve zoomCurve)
|
||||
{
|
||||
this.duration = duration;
|
||||
this.relativeZoom = relativeZoom;
|
||||
this.zoomCurve = zoomCurve;
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new CameraZoomEffect(duration, relativeZoom, zoomCurve);
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Ichni.RhythmGame
|
||||
public float duration;
|
||||
public float peak;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
|
||||
public ChromaticAberrationEffect(float duration, float peak, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -32,12 +32,12 @@ namespace Ichni.RhythmGame
|
||||
effect.PlayFeedbacks();
|
||||
LeanPool.Despawn(effect.gameObject, duration);
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new ChromaticAberrationEffect_BM(duration, peak, intensityCurve);
|
||||
}
|
||||
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
@@ -47,9 +47,10 @@ namespace Ichni.RhythmGame
|
||||
var bloomPeakField = inspector.GenerateInputField(this, effectSettings, "Peak Value", nameof(peak));
|
||||
var intensityCurveButton = inspector.GenerateButton(this, effectSettings, "Intensity Curve", () =>
|
||||
{
|
||||
var intensityCurveWindow =
|
||||
var intensityCurveWindow =
|
||||
inspector.GenerateCompositeParameterWindow(this, "Intensity Curve", nameof(intensityCurve)).SetAsCustomCurve();
|
||||
});
|
||||
SetRemove(effectSettings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,9 +64,9 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public ChromaticAberrationEffect_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public ChromaticAberrationEffect_BM(float duration, float peak, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -73,7 +74,7 @@ namespace Ichni.RhythmGame
|
||||
this.peak = peak;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new ChromaticAberrationEffect(duration, peak, intensityCurve);
|
||||
|
||||
@@ -13,11 +13,11 @@ namespace Ichni.RhythmGame
|
||||
public GameElement connectedGameElement;
|
||||
public string connectedVariableName;
|
||||
public int enableValue;
|
||||
|
||||
|
||||
public bool useExpression;
|
||||
public string expression;
|
||||
|
||||
public EnableControlEffect(GameElement connectedGameElement, string connectedVariableName,
|
||||
|
||||
public EnableControlEffect(GameElement connectedGameElement, string connectedVariableName,
|
||||
int enableValue, bool useExpression, string expression)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -27,18 +27,18 @@ namespace Ichni.RhythmGame
|
||||
this.useExpression = useExpression;
|
||||
this.expression = expression;
|
||||
}
|
||||
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
if (connectedGameElement == null) return;
|
||||
|
||||
|
||||
connectedGameElement.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
if (connectedGameElement == null) return;
|
||||
|
||||
|
||||
if (!useExpression)
|
||||
{
|
||||
int value = EditorManager.instance.variablesContainer.GetVariable(connectedVariableName);
|
||||
@@ -46,22 +46,22 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
connectedGameElement.SaveBM();
|
||||
return new EnableControlEffect_BM(connectedGameElement.elementGuid,
|
||||
return new EnableControlEffect_BM(connectedGameElement.elementGuid,
|
||||
connectedVariableName, enableValue, useExpression, expression);
|
||||
}
|
||||
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
|
||||
|
||||
|
||||
var container = inspector.GenerateContainer("Enable Control");
|
||||
var effectSettings = container.GenerateSubcontainer(3);
|
||||
var connectedGameElementInputField = inspector.GenerateInputField(effectSettings, "Game Element Name");
|
||||
@@ -69,7 +69,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
connectedGameElement = EditorManager.instance.beatmapContainer.gameElementList
|
||||
.First(e => e.elementName == connectedGameElementInputField.GetValue<string>());
|
||||
|
||||
|
||||
if (connectedGameElement == null)
|
||||
{
|
||||
LogWindow.Log("Game Element not found.", Color.red);
|
||||
@@ -80,15 +80,16 @@ namespace Ichni.RhythmGame
|
||||
|
||||
string ShowConnection() => connectedGameElement == null ? "No Game Element Connected" : "Connected With: " + connectedGameElement.elementName;
|
||||
var connectHintText = inspector.GenerateHintText(this, effectSettings, ShowConnection);
|
||||
|
||||
|
||||
var connectedVariableNameInputField = inspector.GenerateInputField(this, effectSettings, "Connected Variable Name", nameof(connectedVariableName));
|
||||
var enableValueInputField = inspector.GenerateInputField(this, effectSettings, "Enable Value", nameof(enableValue));
|
||||
|
||||
|
||||
// 自定义表达式暂时不可用
|
||||
var useExpressionToggle = inspector.GenerateToggle(this, effectSettings, "Use Expression", nameof(useExpression));
|
||||
useExpressionToggle.toggle.interactable = false;
|
||||
var expressionInputField = inspector.GenerateInputField(this, effectSettings, "Expression", nameof(expression));
|
||||
expressionInputField.inputField.interactable = false;
|
||||
SetRemove(effectSettings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,10 +105,10 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public EnableControlEffect_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public EnableControlEffect_BM(Guid connectedGameElementGuid, string connectedVariableName,
|
||||
public EnableControlEffect_BM(Guid connectedGameElementGuid, string connectedVariableName,
|
||||
int enableValue, bool useExpression, string expression)
|
||||
{
|
||||
this.connectedGameElementGuid = connectedGameElementGuid;
|
||||
@@ -119,7 +120,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new EnableControlEffect(GameElement_BM.GetElement(connectedGameElementGuid), connectedVariableName,
|
||||
return new EnableControlEffect(GameElement_BM.GetElement(connectedGameElementGuid), connectedVariableName,
|
||||
enableValue, useExpression, expression);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Ichni.RhythmGame
|
||||
public float duration;
|
||||
public float peak;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
|
||||
public HighPassFilterEffect(float duration, float peak, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -22,18 +22,18 @@ namespace Ichni.RhythmGame
|
||||
this.peak = peak;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.highPassFilterEffect).GetComponent<MMF_Player>();
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterHighPass>().Duration = duration;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterHighPass>().RemapHighPassZero = 10;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterHighPass>().RemapHighPassZero = 10;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterHighPass>().RemapHighPassOne = peak;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterHighPass>().ShakeHighPass = intensityCurve;
|
||||
effect.PlayFeedbacks();
|
||||
LeanPool.Despawn(effect.gameObject, duration);
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new HighPassFilterEffect_BM(duration, peak, intensityCurve);
|
||||
@@ -48,25 +48,26 @@ namespace Ichni.RhythmGame
|
||||
var bloomPeakField = inspector.GenerateInputField(this, effectSettings, "Bottom", nameof(peak));
|
||||
var intensityCurveButton = inspector.GenerateButton(this, effectSettings, "Intensity Curve", () =>
|
||||
{
|
||||
var intensityCurveWindow =
|
||||
var intensityCurveWindow =
|
||||
inspector.GenerateCompositeParameterWindow(this, "Intensity Curve", nameof(intensityCurve)).SetAsCustomCurve();
|
||||
});
|
||||
SetRemove(effectSettings);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class HighPassFilterEffect_BM: EffectBase_BM
|
||||
public class HighPassFilterEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public float peak;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
|
||||
public HighPassFilterEffect_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public HighPassFilterEffect_BM(float duration, float peak, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -74,7 +75,7 @@ namespace Ichni.RhythmGame
|
||||
this.peak = peak;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new HighPassFilterEffect(duration, peak, intensityCurve);
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Ichni.RhythmGame
|
||||
public float duration;
|
||||
public float bottom;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
|
||||
public LowPassFilterEffect(float duration, float bottom, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -22,7 +22,7 @@ namespace Ichni.RhythmGame
|
||||
this.bottom = bottom;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.lowPassFilterEffect).GetComponent<MMF_Player>();
|
||||
@@ -33,7 +33,7 @@ namespace Ichni.RhythmGame
|
||||
effect.PlayFeedbacks();
|
||||
LeanPool.Despawn(effect.gameObject, duration);
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new LowPassFilterEffect_BM(duration, bottom, intensityCurve);
|
||||
@@ -48,25 +48,26 @@ namespace Ichni.RhythmGame
|
||||
var bloomPeakField = inspector.GenerateInputField(this, effectSettings, "Bottom", nameof(bottom));
|
||||
var intensityCurveButton = inspector.GenerateButton(this, effectSettings, "Intensity Curve", () =>
|
||||
{
|
||||
var intensityCurveWindow =
|
||||
var intensityCurveWindow =
|
||||
inspector.GenerateCompositeParameterWindow(this, "Intensity Curve", nameof(intensityCurve)).SetAsCustomCurve();
|
||||
});
|
||||
SetRemove(effectSettings);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class LowPassFilterEffect_BM: EffectBase_BM
|
||||
public class LowPassFilterEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public float bottom;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
|
||||
public LowPassFilterEffect_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public LowPassFilterEffect_BM(float duration, float bottom, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -74,7 +75,7 @@ namespace Ichni.RhythmGame
|
||||
this.bottom = bottom;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new LowPassFilterEffect(duration, bottom, intensityCurve);
|
||||
|
||||
@@ -12,13 +12,13 @@ namespace Ichni.RhythmGame
|
||||
public float bottomX;
|
||||
public float bottomY;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
|
||||
public PixelateEffect(float duration, float bottomX, float bottomY, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.bottomX = bottomX;
|
||||
this.bottomY = bottomY;
|
||||
this.bottomY = bottomY;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
@@ -44,9 +44,9 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
float x = Mathf.Lerp(Screen.width, bottomX, intensityCurve.Evaluate(effectProgressPercent));
|
||||
float y = Mathf.Lerp(Screen.height, bottomY, intensityCurve.Evaluate(effectProgressPercent));
|
||||
Debug.Log(x + ", " + y);
|
||||
|
||||
EditorManager.instance.postProcessingManager.SetPixelateStrength(x,y);
|
||||
// Debug.Log(x + ", " + y);
|
||||
|
||||
EditorManager.instance.postProcessingManager.SetPixelateStrength(x, y);
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
@@ -54,7 +54,7 @@ namespace Ichni.RhythmGame
|
||||
EditorManager.instance.postProcessingManager.SetPixelateStrength(Screen.width, Screen.height);
|
||||
EditorManager.instance.postProcessingManager.SetFeatureActive(false);
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new PixelateEffect_BM(duration, bottomX, bottomY, intensityCurve);
|
||||
@@ -70,7 +70,7 @@ namespace Ichni.RhythmGame
|
||||
var bottomYField = inspector.GenerateInputField(this, effectSettings, "Bottom Y", nameof(bottomY));
|
||||
var intensityCurveButton = inspector.GenerateButton(this, effectSettings, "Intensity Curve", () =>
|
||||
{
|
||||
var intensityCurveWindow =
|
||||
var intensityCurveWindow =
|
||||
inspector.GenerateCompositeParameterWindow(this, "Intensity Curve", nameof(intensityCurve)).SetAsCustomCurve();
|
||||
});
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
EditorManager.instance.postProcessingManager.SetFeatureActive(false);
|
||||
});
|
||||
SetRemove(effectSettings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +96,7 @@ namespace Ichni.RhythmGame
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.bottomX = bottomX;
|
||||
this.bottomY = bottomY;
|
||||
this.bottomY = bottomY;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ namespace Ichni.RhythmGame
|
||||
public class SetIntegerEffect : EffectBase
|
||||
{
|
||||
public string targetVariableName;
|
||||
|
||||
|
||||
public int targetValue;
|
||||
|
||||
|
||||
public bool isRandom;
|
||||
public int minValue;
|
||||
public int maxValue;
|
||||
@@ -51,6 +51,7 @@ namespace Ichni.RhythmGame
|
||||
var isRandomToggle = inspector.GenerateToggle(this, effectSettings, "Is Random", nameof(isRandom));
|
||||
var minValueInputField = inspector.GenerateInputField(this, effectSettings, "Min Value", nameof(minValue));
|
||||
var maxValueInputField = inspector.GenerateInputField(this, effectSettings, "Max Value", nameof(maxValue));
|
||||
SetRemove(effectSettings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +67,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public SetIntegerEffect_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public SetIntegerEffect_BM(string targetVariableName, int targetValue, bool isRandom, int minValue, int maxValue)
|
||||
@@ -78,7 +79,7 @@ namespace Ichni.RhythmGame
|
||||
this.minValue = minValue;
|
||||
this.maxValue = maxValue;
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new SetIntegerEffect(targetVariableName, targetValue, isRandom, minValue, maxValue);
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Ichni.RhythmGame
|
||||
public float smoothness;
|
||||
public Color color;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
|
||||
public VignetteEffect(float duration, float peak, float smoothness, Color color, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -41,12 +41,12 @@ namespace Ichni.RhythmGame
|
||||
effect.PlayFeedbacks();
|
||||
Lean.Pool.LeanPool.Despawn(effect.gameObject, duration);
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new VignetteEffect_BM(duration, peak, smoothness, color, intensityCurve);
|
||||
}
|
||||
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
@@ -57,12 +57,13 @@ namespace Ichni.RhythmGame
|
||||
var smoothnessField = inspector.GenerateInputField(this, effectSettings, "Smoothness", nameof(smoothness));
|
||||
var intensityCurveButton = inspector.GenerateButton(this, effectSettings, "Intensity Curve", () =>
|
||||
{
|
||||
var intensityCurveWindow =
|
||||
var intensityCurveWindow =
|
||||
inspector.GenerateCompositeParameterWindow(this, "Intensity Curve", nameof(intensityCurve)).SetAsCustomCurve();
|
||||
});
|
||||
|
||||
|
||||
var colorSettings = container.GenerateSubcontainer(1);
|
||||
var colorField = inspector.GenerateBaseColorPicker(this, colorSettings, "Color", nameof(color));
|
||||
SetRemove(effectSettings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,12 +76,12 @@ namespace Ichni.RhythmGame
|
||||
public float smoothness;
|
||||
public Color color;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
|
||||
public VignetteEffect_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public VignetteEffect_BM(float duration, float peak, float smoothness, Color color, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
@@ -90,7 +91,7 @@ namespace Ichni.RhythmGame
|
||||
this.color = color;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new VignetteEffect(duration, peak, smoothness, color, intensityCurve);
|
||||
|
||||
@@ -17,8 +17,13 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
||||
public bool MotionAngles = false;
|
||||
|
||||
private float SongTime => EditorManager.instance.songInformation.songTime;
|
||||
|
||||
public static TrackHeadPoint GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, Track track)
|
||||
|
||||
|
||||
{
|
||||
TrackHeadPoint head = Instantiate(EditorManager.instance.basePrefabs.emptyObject, track.transform)
|
||||
.AddComponent<TrackHeadPoint>();
|
||||
@@ -41,7 +46,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (track.timeDurationSubmodule.CheckTimeInDuration(EditorManager.instance.songInformation.songTime))
|
||||
if (SongTime > trackTimeSubmoduleMovable.trackStartTime && SongTime < trackTimeSubmoduleMovable.trackEndTime && track.timeDurationSubmodule.CheckTimeInDuration(SongTime))
|
||||
{
|
||||
trackPositioner.SetPercent(trackTimeSubmoduleMovable.headPercent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user