23 lines
886 B
C#
23 lines
886 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Lean.Pool;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.RhythmGame
|
|
{
|
|
public class SubstantialObject : BaseElement
|
|
{
|
|
public string themeBundleName, objectName;
|
|
|
|
public static SubstantialObject GenerateElement(string elementName, string themeBundleName,
|
|
string objectName, Vector3 position, Vector3 eulerAngles, Vector3 scale, BaseElement parent,
|
|
bool isFirstGenerated = true)
|
|
{
|
|
GameObject themeBundleObject = ThemeBundleManager.instance.GetObject<GameObject>(themeBundleName, objectName);
|
|
SubstantialObject substantialObject = LeanPool.Spawn(themeBundleObject, parent.transform).GetComponent<SubstantialObject>();
|
|
substantialObject.NewInitialize(elementName);
|
|
|
|
return substantialObject;
|
|
}
|
|
}
|
|
} |