列表输入二级界面扩展List<float>,特效单元扩展
This commit is contained in:
BIN
Assets/Scripts/.DS_Store
vendored
BIN
Assets/Scripts/.DS_Store
vendored
Binary file not shown.
BIN
Assets/Scripts/DynamicUI/.DS_Store
vendored
BIN
Assets/Scripts/DynamicUI/.DS_Store
vendored
Binary file not shown.
@@ -1,20 +1,23 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public class DynamicUIStringUnit : DynamicUICompositeUnit
|
||||
public class DynamicUIInputFieldUnit : DynamicUICompositeUnit
|
||||
{
|
||||
public TMP_InputField stringInputField;
|
||||
[FormerlySerializedAs("stringInputField")]
|
||||
public TMP_InputField inputField;
|
||||
|
||||
public override void SetUnit(CompositeParameterWindow window, object itemContent)
|
||||
{
|
||||
compositeParameterWindow = window;
|
||||
stringInputField.text = (string)itemContent;
|
||||
stringInputField.onEndEdit.AddListener(_ => compositeParameterWindow.ApplyParameters());
|
||||
inputField.text = itemContent.ToString();
|
||||
inputField.onEndEdit.AddListener(_ => compositeParameterWindow.ApplyParameters());
|
||||
removeButton.onClick.AddListener(() =>
|
||||
{
|
||||
compositeParameterWindow.RemoveUnit(this);
|
||||
@@ -22,9 +25,9 @@ namespace Ichni.Editor
|
||||
});
|
||||
}
|
||||
|
||||
public string GetValue()
|
||||
public T GetValue<T>()
|
||||
{
|
||||
return stringInputField.text;
|
||||
return (T)Convert.ChangeType(inputField.text, typeof(T));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public class DynamicUIGetterInputField : DynamicUIElement
|
||||
{
|
||||
public TMP_InputField inputField;
|
||||
|
||||
public void SetDefaultText(string text)
|
||||
{
|
||||
inputField.text = text;
|
||||
}
|
||||
|
||||
public T GetResult<T>()
|
||||
{
|
||||
return (T)System.Convert.ChangeType(inputField.text, typeof(T));
|
||||
}
|
||||
|
||||
public string GetResult()
|
||||
{
|
||||
return inputField.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Ichni.RhythmGame;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
@@ -42,12 +43,12 @@ namespace Ichni.Editor
|
||||
//生成Unit
|
||||
void GenerateUnit(string content)
|
||||
{
|
||||
DynamicUIStringUnit unit = Instantiate(unitPrefab, windowRect).GetComponent<DynamicUIStringUnit>();
|
||||
DynamicUIInputFieldUnit unit = Instantiate(unitPrefab, windowRect).GetComponent<DynamicUIInputFieldUnit>();
|
||||
unitList.Add(unit);
|
||||
unit.SetUnit(this, content);
|
||||
}
|
||||
|
||||
unitPrefab = EditorManager.instance.basePrefabs.stringUnit;
|
||||
unitPrefab = EditorManager.instance.basePrefabs.inputFieldUnit;
|
||||
|
||||
//初始化:获取当前的List<string>,并生成对应的Unit
|
||||
List<string> list = connectedBaseElement.GetType().GetField(parameterName).GetValue(connectedBaseElement) as List<string>;
|
||||
@@ -67,13 +68,38 @@ namespace Ichni.Editor
|
||||
//将当前所有Unit的值应用到对应的变量中
|
||||
ApplyParameters = () =>
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
foreach (var unit in unitList)
|
||||
{
|
||||
list.Add((unit as DynamicUIStringUnit).GetValue());
|
||||
Debug.Log((unit as DynamicUIStringUnit).GetValue());
|
||||
}
|
||||
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, list);
|
||||
List<string> stringList = unitList.Select(unit => (unit as DynamicUIInputFieldUnit).GetValue<string>()).ToList();
|
||||
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, stringList);
|
||||
};
|
||||
}
|
||||
|
||||
public void SetAsFloatList()
|
||||
{
|
||||
void GenerateUnit(float content)
|
||||
{
|
||||
DynamicUIInputFieldUnit unit = Instantiate(unitPrefab, windowRect).GetComponent<DynamicUIInputFieldUnit>();
|
||||
unitList.Add(unit);
|
||||
unit.SetUnit(this, content);
|
||||
}
|
||||
|
||||
unitPrefab = EditorManager.instance.basePrefabs.inputFieldUnit;
|
||||
List<float> list = connectedBaseElement.GetType().GetField(parameterName).GetValue(connectedBaseElement) as List<float>;
|
||||
foreach (float item in list)
|
||||
{
|
||||
GenerateUnit(item);
|
||||
}
|
||||
addNewUnitButton.GetComponent<RectTransform>().SetAsLastSibling();
|
||||
|
||||
addNewUnitButton.onClick.AddListener(() =>
|
||||
{
|
||||
GenerateUnit(0);
|
||||
addNewUnitButton.GetComponent<RectTransform>().SetAsLastSibling();
|
||||
});
|
||||
|
||||
ApplyParameters = () =>
|
||||
{
|
||||
List<float> floatList = unitList.Select(unit => (unit as DynamicUIInputFieldUnit).GetValue<float>()).ToList();
|
||||
connectedBaseElement.GetType().GetField(parameterName).SetValue(connectedBaseElement, floatList);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Ichni.Editor
|
||||
string title, string defaultText = "") //不与参数绑定的InputField
|
||||
{
|
||||
DynamicUIInputField inputField = Object
|
||||
.Instantiate(EditorManager.instance.basePrefabs.parameterInputField, container.rect)
|
||||
.Instantiate(EditorManager.instance.basePrefabs.inputField, container.rect)
|
||||
.GetComponent<DynamicUIInputField>();
|
||||
inputField.Initialize(null, title, string.Empty);
|
||||
inputField.SetDefaultValue(defaultText);
|
||||
@@ -82,7 +82,7 @@ namespace Ichni.Editor
|
||||
DynamicUIContainer container, string title, string parameterName, bool isAutoUpdate = false) //与参数绑定的InputField
|
||||
{
|
||||
DynamicUIInputField inputField = Object
|
||||
.Instantiate(EditorManager.instance.basePrefabs.parameterInputField, container.rect)
|
||||
.Instantiate(EditorManager.instance.basePrefabs.inputField, container.rect)
|
||||
.GetComponent<DynamicUIInputField>();
|
||||
inputField.Initialize(baseElement, title, parameterName);
|
||||
container.dynamicUIElements.Add(inputField);
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Ichni.RhythmGame
|
||||
Note,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public interface IHaveEffectSubmodule
|
||||
{
|
||||
public EffectSubmodule effectSubmodule { get; set; }
|
||||
@@ -90,7 +90,10 @@ namespace Ichni.RhythmGame
|
||||
public static Dictionary<string, EffectBase> EffectCollection { get; } =
|
||||
new Dictionary<string, EffectBase>()
|
||||
{
|
||||
{"BloomShake", new BloomShake(1, 2)}
|
||||
{ "Bloom", new BloomEffect(1, 2) },
|
||||
{ "CameraShake", new CameraShakeEffect(1, 50, 1, 1, 1) },
|
||||
{ "ChromaticAberration", new ChromaticAberrationEffect(1, 1) },
|
||||
{ "Vignette", new VignetteEffect(1, 1, 0.4f, Color.black) }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Ichni.RhythmGame
|
||||
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
|
||||
var timeEffectsCollectionButton = inspector.GenerateButton(this, container, "Time Effects Collection",
|
||||
() => TimeEffectsCollection.GenerateElement("New Time Effects Collection", Guid.NewGuid(),
|
||||
new List<string>(), true, this, 0f));
|
||||
new List<string>(), true, this, 0));
|
||||
container.SetDeviver(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,63 +10,63 @@ using Sirenix.OdinInspector;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
public class BloomShake : EffectBase
|
||||
public class BloomEffect : EffectBase
|
||||
{
|
||||
public float bloomTime;
|
||||
public float bloomPeak;
|
||||
public float duration;
|
||||
public float peak;
|
||||
|
||||
public BloomShake(float bloomTime, float bloomPeak)
|
||||
public BloomEffect(float duration, float peak)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
this.bloomTime = bloomTime;
|
||||
this.bloomPeak = bloomPeak;
|
||||
this.duration = duration;
|
||||
this.peak = peak;
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.bloomShake).GetComponent<MMF_Player>();
|
||||
effect.GetFeedbackOfType<MMF_Bloom_URP>().ShakeDuration = bloomTime;
|
||||
effect.GetFeedbackOfType<MMF_Bloom_URP>().RemapIntensityOne = bloomPeak;
|
||||
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.bloomEffect).GetComponent<MMF_Player>();
|
||||
effect.GetFeedbackOfType<MMF_Bloom_URP>().ShakeDuration = duration;
|
||||
effect.GetFeedbackOfType<MMF_Bloom_URP>().RemapIntensityOne = peak;
|
||||
effect.PlayFeedbacks();
|
||||
LeanPool.Despawn(effect.gameObject, bloomTime);
|
||||
LeanPool.Despawn(effect.gameObject, duration);
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new BloomShake_BM(bloomTime, bloomPeak);
|
||||
return new BloomEffect_BM(duration, peak);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Bloom Shake");
|
||||
var effectTimeField = inspector.GenerateInputField(this, container, "Bloom Time", nameof(bloomTime));
|
||||
var bloomPeakField = inspector.GenerateInputField(this, container, "Bloom Peak", nameof(bloomPeak));
|
||||
var effectTimeField = inspector.GenerateInputField(this, container, "Bloom Time", nameof(duration));
|
||||
var bloomPeakField = inspector.GenerateInputField(this, container, "Bloom Peak", nameof(peak));
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BloomShake_BM : EffectBase_BM
|
||||
public class BloomEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float bloomTime;
|
||||
public float bloomPeak;
|
||||
public float duration;
|
||||
public float peak;
|
||||
|
||||
public BloomShake_BM()
|
||||
public BloomEffect_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BloomShake_BM(float bloomTime, float bloomPeak)
|
||||
public BloomEffect_BM(float duration, float peak)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
this.bloomTime = bloomTime;
|
||||
this.bloomPeak = bloomPeak;
|
||||
this.duration = duration;
|
||||
this.peak = peak;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new BloomShake(bloomTime, bloomPeak);
|
||||
return new BloomEffect(duration, peak);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
using MoreMountains.Feedbacks;
|
||||
using MoreMountains.FeedbacksForThirdParty;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
public class CameraShakeEffect : EffectBase
|
||||
{
|
||||
public float duration;
|
||||
public float frequency;
|
||||
public float amplitudeX;
|
||||
public float amplitudeY;
|
||||
public float amplitudeZ;
|
||||
|
||||
public CameraShakeEffect(float duration, float frequency, float amplitudeX, float amplitudeY, float amplitudeZ)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
this.duration = duration;
|
||||
this.frequency = frequency;
|
||||
this.amplitudeX = amplitudeX;
|
||||
this.amplitudeY = amplitudeY;
|
||||
this.amplitudeZ = amplitudeZ;
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.cameraShakeEffect).GetComponent<MMF_Player>();
|
||||
effect.GetFeedbackOfType<MMF_CameraShake>().CameraShakeProperties.Duration = duration;
|
||||
effect.GetFeedbackOfType<MMF_CameraShake>().CameraShakeProperties.Frequency = 1f / frequency;
|
||||
effect.GetFeedbackOfType<MMF_CameraShake>().CameraShakeProperties.AmplitudeX = amplitudeX;
|
||||
effect.GetFeedbackOfType<MMF_CameraShake>().CameraShakeProperties.AmplitudeY = amplitudeY;
|
||||
effect.GetFeedbackOfType<MMF_CameraShake>().CameraShakeProperties.AmplitudeZ = amplitudeZ;
|
||||
effect.PlayFeedbacks();
|
||||
LeanPool.Despawn(effect.gameObject, duration);
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new CameraShakeEffect_BM(duration, frequency, amplitudeX, amplitudeY, amplitudeZ);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Camera Shake");
|
||||
var durationInputField = inspector.GenerateInputField(this, container, "Duration", nameof(duration));
|
||||
var frequencyInputField = inspector.GenerateInputField(this, container, "Frequency", nameof(frequency));
|
||||
var amplitudeXInputField = inspector.GenerateInputField(this, container, "Amplitude X", nameof(amplitudeX));
|
||||
var amplitudeYInputField = inspector.GenerateInputField(this, container, "Amplitude Y", nameof(amplitudeY));
|
||||
var amplitudeZInputField = inspector.GenerateInputField(this, container, "Amplitude Z", nameof(amplitudeZ));
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class CameraShakeEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public float frequency;
|
||||
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;
|
||||
this.duration = duration;
|
||||
this.frequency = frequency;
|
||||
this.amplitudeX = amplitudeX;
|
||||
this.amplitudeY = amplitudeY;
|
||||
this.amplitudeZ = amplitudeZ;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new CameraShakeEffect(duration, frequency, amplitudeX, amplitudeY, amplitudeZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 230247eae56474f058bf4a2184cadd9a
|
||||
guid: 02f91a687fb17491190605b9d6da93ee
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -0,0 +1,72 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
using MoreMountains.Feedbacks;
|
||||
using MoreMountains.FeedbacksForThirdParty;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
public class ChromaticAberrationEffect : EffectBase
|
||||
{
|
||||
public float duration;
|
||||
public float peak;
|
||||
|
||||
public ChromaticAberrationEffect(float duration, float peak)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
this.duration = duration;
|
||||
this.peak = peak;
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
MMF_Player effect = LeanPool.Spawn(EditorManager.instance.basePrefabs.chromaticAberrationEffect).GetComponent<MMF_Player>();
|
||||
effect.GetFeedbackOfType<MMF_ChromaticAberration_URP>().Duration = duration;
|
||||
effect.GetFeedbackOfType<MMF_ChromaticAberration_URP>().RemapIntensityOne = peak;
|
||||
effect.PlayFeedbacks();
|
||||
LeanPool.Despawn(effect.gameObject, duration);
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new ChromaticAberrationEffect_BM(duration, peak);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Chromatic Aberration");
|
||||
var effectTimeField = inspector.GenerateInputField(this, container, "Duration", nameof(duration));
|
||||
var bloomPeakField = inspector.GenerateInputField(this, container, "Peak Value", nameof(peak));
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class ChromaticAberrationEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public float peak;
|
||||
|
||||
public ChromaticAberrationEffect_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ChromaticAberrationEffect_BM(float duration, float peak)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
this.duration = duration;
|
||||
this.peak = peak;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new ChromaticAberrationEffect(duration, peak);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec0b0748a899444478c1463dd2479c21
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -64,11 +64,6 @@ namespace Ichni.RhythmGame
|
||||
LogWindow.Log("Effect Type not found.", Color.red);
|
||||
}
|
||||
});
|
||||
|
||||
foreach (var effect in effectSubmodule.effectCollection["Default"])
|
||||
{
|
||||
effect.SetUpInspector();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using MoreMountains.Feedbacks;
|
||||
using MoreMountains.FeedbacksForThirdParty;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
public class VignetteEffect : EffectBase
|
||||
{
|
||||
public float duration;
|
||||
public float peak;
|
||||
public float smoothness;
|
||||
public Color color;
|
||||
|
||||
public VignetteEffect(float duration, float peak, float smoothness, Color color)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
this.duration = duration;
|
||||
this.peak = peak;
|
||||
this.smoothness = smoothness;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
MMF_Player effect = Lean.Pool.LeanPool.Spawn(EditorManager.instance.basePrefabs.vignetteEffect).GetComponent<MMF_Player>();
|
||||
effect.GetFeedbackOfType<MMF_Vignette_URP>().Duration = duration;
|
||||
effect.GetFeedbackOfType<MMF_Vignette_URP>().RemapIntensityOne = peak;
|
||||
if (EditorManager.instance.postProcessingManager.globalVolume.profile.TryGet(out Vignette vignette))
|
||||
{
|
||||
vignette.smoothness.value = smoothness;
|
||||
vignette.color.value = color;
|
||||
}
|
||||
effect.PlayFeedbacks();
|
||||
Lean.Pool.LeanPool.Despawn(effect.gameObject, duration);
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new VignetteEffect_BM(duration, peak, smoothness, color);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Vignette");
|
||||
var durationField = inspector.GenerateInputField(this, container, "Duration", nameof(duration));
|
||||
var peakField = inspector.GenerateInputField(this, container, "Peak Value", nameof(peak));
|
||||
var smoothnessField = inspector.GenerateInputField(this, container, "Smoothness", nameof(smoothness));
|
||||
var colorField = inspector.GenerateBaseColorPicker(this, container, "Color", nameof(color));
|
||||
container.SetDeviver(1);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class VignetteEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float duration;
|
||||
public float peak;
|
||||
public float smoothness;
|
||||
public Color color;
|
||||
|
||||
public VignetteEffect_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public VignetteEffect_BM(float duration, float peak, float smoothness, Color color)
|
||||
{
|
||||
this.duration = duration;
|
||||
this.peak = peak;
|
||||
this.smoothness = smoothness;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new VignetteEffect(duration, peak, smoothness, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 376e99f179fef44f0b49cef589dd558a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -117,14 +117,12 @@ namespace Ichni.RhythmGame
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
Track track = attachedElement as Track;
|
||||
track.trackPathSubmodule = new TrackPathSubmodule(track, trackSpaceType, trackSamplingType, isClosed);
|
||||
track.submoduleList.Add(track.trackPathSubmodule);
|
||||
}
|
||||
|
||||
public override void DuplicateBM(GameElement attached)
|
||||
{
|
||||
Track track = attached as Track;
|
||||
track.trackPathSubmodule = new TrackPathSubmodule(track, trackSpaceType, trackSamplingType, isClosed);
|
||||
track.submoduleList.Add(track.trackPathSubmodule);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Ichni.RhythmGame
|
||||
public TrackSubmodule(Track track) : base(track)
|
||||
{
|
||||
this.track = track;
|
||||
this.track.submoduleList.Add(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,14 +120,12 @@ namespace Ichni.RhythmGame
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
Track track = attachedElement as Track;
|
||||
track.trackTimeSubmodule = new TrackTimeSubmoduleMovable(track, trackStartTime, trackEndTime, visibleTrackTimeLength, animationCurveType);
|
||||
track.submoduleList.Add(track.trackTimeSubmodule);
|
||||
}
|
||||
|
||||
public override void DuplicateBM(GameElement attached)
|
||||
{
|
||||
Track track = attached as Track;
|
||||
track.trackTimeSubmodule = new TrackTimeSubmoduleMovable(track, trackStartTime, trackEndTime, visibleTrackTimeLength, animationCurveType);
|
||||
track.submoduleList.Add(track.trackTimeSubmodule);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,14 +197,12 @@ namespace Ichni.RhythmGame
|
||||
attachedElement = GameElement_BM.GetElement(attachedElementGuid);
|
||||
Track track = attachedElement as Track;
|
||||
track.trackTimeSubmodule = new TrackTimeSubmoduleStatic(track, trackTotalTime, animationCurveType);
|
||||
track.submoduleList.Add(track.trackTimeSubmodule);
|
||||
}
|
||||
|
||||
public override void DuplicateBM(GameElement attached)
|
||||
{
|
||||
Track track = attached as Track;
|
||||
track.trackTimeSubmodule = new TrackTimeSubmoduleStatic(track, trackTotalTime, animationCurveType);
|
||||
track.submoduleList.Add(track.trackTimeSubmodule);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,15 +29,20 @@ public class BasePrefabsCollection : SerializedScriptableObject
|
||||
public AudioClip holdNoteEndSound;
|
||||
public AudioClip flickNoteSound;
|
||||
|
||||
[Title("Effect相关")] public GameObject bloomShake;
|
||||
[Title("Effect相关")]
|
||||
[FormerlySerializedAs("bloomShake")]
|
||||
public GameObject bloomEffect;
|
||||
[FormerlySerializedAs("cameraShake")]
|
||||
public GameObject cameraShakeEffect;
|
||||
public GameObject chromaticAberrationEffect;
|
||||
public GameObject vignetteEffect;
|
||||
|
||||
[Title("Inspector相关")]
|
||||
public GameObject inspectorSecondaryWindow;
|
||||
|
||||
[Title("DynamicUI相关-Simple")]
|
||||
public GameObject dynamicUIContainer;
|
||||
[FormerlySerializedAs("inputField")] public GameObject parameterInputField;
|
||||
public GameObject getterInputField;
|
||||
[FormerlySerializedAs("parameterInputField")] public GameObject inputField;
|
||||
[FormerlySerializedAs("Vector3inputField")] public GameObject vector3InputField;
|
||||
[FormerlySerializedAs("text")] public GameObject parameterText;
|
||||
public GameObject hintText;
|
||||
@@ -49,7 +54,7 @@ public class BasePrefabsCollection : SerializedScriptableObject
|
||||
public GameObject emissionColorPicker;
|
||||
[Title("DynamicUI相关-Composite")]
|
||||
public GameObject compositeParameterWindow;
|
||||
public GameObject stringUnit;
|
||||
[FormerlySerializedAs("stringUnit")] public GameObject inputFieldUnit;
|
||||
public GameObject animatedFloatUnit;
|
||||
public GameObject animatedIntUnit;
|
||||
public GameObject animatedBoolUnit;
|
||||
|
||||
@@ -21,7 +21,10 @@ namespace Ichni
|
||||
public OperationManager operationManager;
|
||||
public BackgroundController backgroundController;
|
||||
public CameraManager cameraManager;
|
||||
public PostProcessingManager postProcessingManager;
|
||||
|
||||
public Timeline timeline;
|
||||
|
||||
public ProjectInformation projectInformation;
|
||||
public SongInformation songInformation;
|
||||
public BeatmapContainer beatmapContainer;
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
public class PostProcessingManager : MonoBehaviour
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
public class PostProcessingManager : MonoBehaviour
|
||||
{
|
||||
|
||||
public Volume globalVolume;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user