27 lines
684 B
C#
27 lines
684 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
[Serializable]
|
|||
|
public abstract class SceneObjectBuilder<V> : MonoBehaviour, SceneObjectBuilderInterface<V>
|
|||
|
{
|
|||
|
protected virtual string MODEL_SOURCE_PATH => "";
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// List of chests deffaultly builded on scene
|
|||
|
/// </summary>
|
|||
|
[SerializeField] public List<V> ElementsToBuildOnSceneList = new List<V>();
|
|||
|
|
|||
|
public virtual void BuildList()
|
|||
|
{
|
|||
|
foreach(var objectToBuild in ElementsToBuildOnSceneList)
|
|||
|
{
|
|||
|
Build(objectToBuild);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public abstract void Build(V objectToBuild);
|
|||
|
|
|||
|
public abstract GameObject FindModel(string modelName);
|
|||
|
}
|