using System.Collections; using System.Collections.Generic; using Lean.Pool; using UnityEngine; namespace Ichni.RhythmGame { public class EnvironmentObject : SubstantialObject { public bool isStatic; public static SubstantialObject GenerateElement(string elementName, string themeBundleName, string objectName, Vector3 position, Vector3 eulerAngles, Vector3 scale, BaseElement parent, bool isStatic, bool isFirstGenerated = true) { EnvironmentObject themeBundleObject = ThemeBundleManager.instance.GetObject(themeBundleName, objectName); EnvironmentObject environmentObject = Instantiate(themeBundleObject, parent.transform).GetComponent(); environmentObject.Initialize(elementName); environmentObject.isStatic = isStatic; return environmentObject; } } }