25 lines
1019 B
C#
25 lines
1019 B
C#
using System;
|
|
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, 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, id, tags);
|
|
environmentObject.isStatic = isStatic;
|
|
return environmentObject;
|
|
}
|
|
}
|
|
} |