看完了
顺手加了个element改名同步hierarchy 3D遮挡!!! 然后发现当track或者folder旋转时pathnode的法线(旋转)不会跟着 以上测试放在IceFlowerMaster项目中 还有 现在没中文字体
This commit is contained in:
@@ -16,14 +16,14 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
public float intensity;
|
||||
public float range;
|
||||
public bool castShadows;
|
||||
|
||||
|
||||
public static PointLight 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, float range, bool castShadows)
|
||||
{
|
||||
PointLight poLight = EnvironmentObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<PointLight>();
|
||||
|
||||
|
||||
poLight.intensity = intensity;
|
||||
poLight.range = range;
|
||||
poLight.castShadows = castShadows;
|
||||
@@ -32,6 +32,7 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
base.Refresh();
|
||||
pointLight.color = colorSubmodule.currentBaseColor;
|
||||
pointLight.intensity = intensity;
|
||||
pointLight.range = range;
|
||||
@@ -43,23 +44,23 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new PointLight_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM,
|
||||
matchedBM = new PointLight_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM,
|
||||
themeBundleName, objectName, isStatic, intensity, range, 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 rangeField = inspector.GenerateInputField(this, container, "Range", nameof(range));
|
||||
rangeField.AddListenerFunction(_ => Refresh());
|
||||
|
||||
|
||||
var castShadowsToggle = inspector.GenerateToggle(this, container, "Cast Shadows", nameof(castShadows));
|
||||
castShadowsToggle.AddListenerFunction(_ => Refresh());
|
||||
}
|
||||
@@ -75,9 +76,9 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
|
||||
public PointLight_BM()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public PointLight_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM parentElement,
|
||||
string themeBundleName, string objectName, bool isStatic, float intensity, float range, bool castShadows)
|
||||
: base(elementName, elementGuid, tags, parentElement, themeBundleName, objectName, isStatic)
|
||||
@@ -86,16 +87,16 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
this.range = range;
|
||||
this.castShadows = castShadows;
|
||||
}
|
||||
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = PointLight.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName, isStatic, intensity, range, castShadows);
|
||||
}
|
||||
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return PointLight.GenerateElement(elementName, Guid.NewGuid(), tags, false,
|
||||
return PointLight.GenerateElement(elementName, Guid.NewGuid(), tags, false,
|
||||
parent, themeBundleName, objectName, isStatic, intensity, range, castShadows);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user