看完了
顺手加了个element改名同步hierarchy 3D遮挡!!! 然后发现当track或者folder旋转时pathnode的法线(旋转)不会跟着 以上测试放在IceFlowerMaster项目中 还有 现在没中文字体
This commit is contained in:
@@ -12,17 +12,17 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
[SerializeField]
|
||||
private Light directionalLight;
|
||||
|
||||
|
||||
public float intensity;
|
||||
public bool castShadows;
|
||||
|
||||
public static DirectionalLight GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName,
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName,
|
||||
bool isStatic, float intensity, bool castShadows)
|
||||
{
|
||||
DirectionalLight dirLight = EnvironmentObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<DirectionalLight>();
|
||||
|
||||
|
||||
dirLight.intensity = intensity;
|
||||
dirLight.castShadows = castShadows;
|
||||
return dirLight;
|
||||
@@ -30,45 +30,46 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
base.Refresh();
|
||||
directionalLight.color = colorSubmodule.currentBaseColor;
|
||||
directionalLight.intensity = intensity;
|
||||
directionalLight.shadows = castShadows ? LightShadows.Soft : LightShadows.None;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public partial class DirectionalLight
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new DirectionalLight_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM,
|
||||
matchedBM = new DirectionalLight_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM,
|
||||
themeBundleName, objectName, isStatic, intensity, castShadows);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
base.SetUpInspector();
|
||||
|
||||
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Directional Light");
|
||||
|
||||
var intensityField = inspector.GenerateInputField(this, container, "Intensity", nameof(intensity));
|
||||
intensityField.AddListenerFunction(_ => Refresh());
|
||||
|
||||
|
||||
var castShadowsToggle = inspector.GenerateToggle(this, container, "Cast Shadows", nameof(castShadows));
|
||||
castShadowsToggle.AddListenerFunction(_ => Refresh());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class DirectionalLight_BM : EnvironmentObject_BM
|
||||
{
|
||||
public float intensity;
|
||||
public bool castShadows;
|
||||
|
||||
|
||||
public DirectionalLight_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public DirectionalLight_BM(string elementName, Guid id, List<string> tags,
|
||||
@@ -81,14 +82,14 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = DirectionalLight.GenerateElement(elementName, elementGuid, tags, false,
|
||||
{
|
||||
matchedElement = DirectionalLight.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName, isStatic, intensity, castShadows);
|
||||
}
|
||||
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return DirectionalLight.GenerateElement(elementName, Guid.NewGuid(), tags, false,
|
||||
return DirectionalLight.GenerateElement(elementName, Guid.NewGuid(), tags, false,
|
||||
parent, themeBundleName, objectName, isStatic, intensity, castShadows);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user