排障 小修改
This commit is contained in:
@@ -67,7 +67,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
elementList.ForEach(element =>
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
//#if UNITY_EDITOR
|
||||
|
||||
|
||||
if (element == null)
|
||||
@@ -80,12 +80,10 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
if (element is GameElement_BM gameElement)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
//Debug.Log("Adding element to identifier: " + gameElement.elementName + " " + gameElement.elementGuid);
|
||||
#endif
|
||||
|
||||
GameElement_BM.identifier.Add(gameElement.elementGuid, gameElement);
|
||||
}
|
||||
|
||||
@@ -97,6 +95,7 @@ namespace Ichni.RhythmGame
|
||||
if (element == null)
|
||||
{
|
||||
Debug.LogError("Null element detected in elementList during low-priority execution. Skipping execution.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ namespace Ichni.RhythmGame
|
||||
AnimationCurve widthCurve, Gradient gradient, Material material = null)
|
||||
{
|
||||
gradient ??= ColorExtensions.DefaultGradient();
|
||||
|
||||
|
||||
Trail trail = Instantiate(EditorManager.instance.basePrefabs.trail, parentElement.transform).GetComponent<Trail>();
|
||||
trail.trailRenderer = trail.GetComponent<TrailRenderer>();
|
||||
|
||||
|
||||
trail.Initialize(name, id, tags, isFirstGenerated, parentElement);
|
||||
|
||||
trail.renderMaterial = material == null ? EditorManager.instance.basePrefabs.defaultTrailMaterial : material;
|
||||
@@ -60,7 +60,7 @@ namespace Ichni.RhythmGame
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new Trail_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM,
|
||||
visibleTimeLength, isAutoOrient, widthMultiplier, widthCurve, renderMaterial);
|
||||
visibleTimeLength, isAutoOrient, widthMultiplier, widthCurve, renderMaterial, gradient);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
@@ -88,7 +88,7 @@ namespace Ichni.RhythmGame
|
||||
widthCurveWindow.SetAsCustomCurve();
|
||||
widthCurveWindow.closeButton.onClick.AddListener(() => trailRenderer.widthCurve = widthCurve);
|
||||
});
|
||||
|
||||
|
||||
var colorSettings = container.GenerateSubcontainer(3);
|
||||
var gradientColorKeysButton = inspector.GenerateButton(this, colorSettings, "Gradient Color Keys", () =>
|
||||
{
|
||||
@@ -144,7 +144,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public Trail_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
||||
float visibleTimeLength, bool isAutoOrient, float widthMultiplier,
|
||||
AnimationCurve widthCurve, Material renderMaterial) : base(elementName, elementGuid, tags,
|
||||
AnimationCurve widthCurve, Material renderMaterial, Gradient gradient) : base(elementName, elementGuid, tags,
|
||||
attachedElement)
|
||||
{
|
||||
this.visibleTimeLength = visibleTimeLength;
|
||||
@@ -152,6 +152,7 @@ namespace Ichni.RhythmGame
|
||||
this.isAutoOrient = isAutoOrient;
|
||||
this.widthMultiplier = widthMultiplier;
|
||||
this.widthCurve = widthCurve;
|
||||
this.gradient = gradient;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using UniRx;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
@@ -18,6 +19,8 @@ namespace Ichni
|
||||
|
||||
public IntReactiveProperty waitingBundleAmount;
|
||||
|
||||
public TMP_Text LogWindow;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (instance == null)
|
||||
@@ -52,11 +55,12 @@ namespace Ichni
|
||||
{
|
||||
waitingBundleAmount = new IntReactiveProperty(list.Count);
|
||||
Debug.Log("Waiting for " + list.Count + " AssetBundles to load.");
|
||||
LogWindow.text += "Waiting for " + list.Count + " AssetBundles to load.\n";
|
||||
foreach (var bundle in list)
|
||||
{
|
||||
LoadThemeBundle(bundle);
|
||||
}
|
||||
|
||||
|
||||
selectedThemeBundleList = list;
|
||||
}
|
||||
|
||||
@@ -131,6 +135,7 @@ namespace Ichni
|
||||
|
||||
yield return new WaitForEndOfFrame();
|
||||
print(themeBundleName + " Done!");
|
||||
LogWindow.text += themeBundleName + " Done!\n";
|
||||
waitingBundleAmount.Value--;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user