StartMenu!

This commit is contained in:
SoulliesOfficial
2025-03-08 14:21:10 -05:00
parent 28e0a6e4b0
commit e0ae43c25c
193 changed files with 43412 additions and 7940 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Ichni.Editor;
using Ichni.RhythmGame.Beatmap;
using Lean.Pool;
using UnityEngine;
@@ -11,15 +12,16 @@ namespace Ichni.RhythmGame
{
public bool isStatic;
public static SubstantialObject GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName, bool isStatic)
public static EnvironmentObject GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement, bool isStatic)
{
EnvironmentObject themeBundleObject =
ThemeBundleManager.instance.GetObject<EnvironmentObject>(themeBundleName, objectName);
EnvironmentObject environmentObject =
Instantiate(themeBundleObject, parentElement.transform).GetComponent<EnvironmentObject>();
environmentObject.Initialize(elementName, id, tags, isFirstGenerated, parentElement);
EnvironmentObject environmentObject =
SubstantialObject.GenerateElement(elementName, id, tags, isFirstGenerated, themeBundleName, objectName, parentElement)
.GetComponent<EnvironmentObject>();
environmentObject.isStatic = isStatic;
environmentObject.gameObject.isStatic = isStatic;
return environmentObject;
}
}
@@ -31,6 +33,38 @@ namespace Ichni.RhythmGame
matchedBM = new EnvironmentObject_BM(elementName, elementGuid, tags,
parentElement.matchedBM as GameElement_BM, themeBundleName, objectName, isStatic);
}
public override void SetUpInspector()
{
base.SetUpInspector();
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Generate");
var environmentObjectButton = inspector.GenerateButton(this, container, "Environment Object",
() => TemporaryObject.GenerateElement("New Environment Object", Guid.NewGuid(), new List<string>(),
true, this));
var isStaticToggle = inspector.GenerateToggle(this, container, "Is Static", nameof(isStatic));
isStaticToggle.AddListenerFunction(_ => gameObject.isStatic = isStatic);
var generateContainer = inspector.GenerateContainer("Generate");
var generateDisplacementButton = inspector.GenerateButton(this, generateContainer, "Displacement",
() => Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var generateSwirlButton = inspector.GenerateButton(this, generateContainer, "Swirl",
() => Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var generateScaleButton = inspector.GenerateButton(this, generateContainer, "Scale",
() => Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var generateBaseColorChangeButton = inspector.GenerateButton(this, generateContainer, "Base Color Change",
() => BaseColorChange.GenerateElement("New Base Color Change", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
if (haveEmission)
{
var generateEmissionColorChangeButton = inspector.GenerateButton(this, generateContainer, "Emission Color Change",
() => EmissionColorChange.GenerateElement("New Emission Color Change", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
}
}
}
namespace Beatmap
@@ -54,13 +88,13 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
matchedElement = EnvironmentObject.GenerateElement(elementName, elementGuid, tags, false,
GetElement(attachedElementGuid), themeBundleName, objectName, isStatic);
themeBundleName, objectName,GetElement(attachedElementGuid), isStatic);
}
public override GameElement DuplicateBM(GameElement parent)
{
return EnvironmentObject.GenerateElement(elementName, Guid.NewGuid(), tags, false,
parent, themeBundleName, objectName, isStatic);
themeBundleName, objectName, parent, isStatic);
}
}
}