基础内容-7

Trail
完整Note
This commit is contained in:
SoulliesOfficial
2025-02-02 08:34:54 -05:00
parent 38ec74bfef
commit efca87e9cd
60 changed files with 1503 additions and 228 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Lean.Pool;
@@ -9,13 +10,14 @@ namespace Ichni.RhythmGame
{
public bool isStatic;
public static SubstantialObject GenerateElement(string elementName, string themeBundleName,
string objectName, Vector3 position, Vector3 eulerAngles, Vector3 scale, BaseElement parent,
public static SubstantialObject GenerateElement(string elementName, Guid id, List<string> tags,
string themeBundleName, string objectName, BaseElement parent,
Vector3 position, Vector3 eulerAngles, Vector3 scale,
bool isStatic, bool isFirstGenerated = true)
{
EnvironmentObject themeBundleObject = ThemeBundleManager.instance.GetObject<EnvironmentObject>(themeBundleName, objectName);
EnvironmentObject environmentObject = Instantiate(themeBundleObject, parent.transform).GetComponent<EnvironmentObject>();
environmentObject.Initialize(elementName);
environmentObject.Initialize(elementName, id, tags);
environmentObject.isStatic = isStatic;
return environmentObject;
}