71 lines
2.6 KiB
C#
71 lines
2.6 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Lean.Pool;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.RhythmGame
|
|
{
|
|
public abstract class SubstantialObject : GameElement, IHaveTransformSubmodule, IHaveTimeDurationSubmodule, IHaveColorSubmodule
|
|
{
|
|
public string themeBundleName, objectName;
|
|
|
|
public TransformSubmodule transformSubmodule { get; set; }
|
|
public TimeDurationSubmodule timeDurationSubmodule { get; set; }
|
|
public ColorSubmodule colorSubmodule { get; set; }
|
|
|
|
public static SubstantialObject GenerateElement(string elementName, Guid id, List<string> tags, bool isFirstGenerated,
|
|
string themeBundleName, string objectName, GameElement parent)
|
|
{
|
|
GameObject themeBundleObject = ThemeBundleManager.instance.GetObject<GameObject>(themeBundleName, objectName);
|
|
SubstantialObject substantialObject = Instantiate(themeBundleObject, parent.transform).GetComponent<SubstantialObject>();
|
|
substantialObject.Initialize(elementName, id, tags, isFirstGenerated);
|
|
substantialObject.SetParent(parent);
|
|
|
|
return substantialObject;
|
|
}
|
|
|
|
protected override void SetDefaultSubmodules()
|
|
{
|
|
transformSubmodule = new TransformSubmodule(this);
|
|
timeDurationSubmodule = new TimeDurationSubmodule(this);
|
|
colorSubmodule = new ColorSubmodule(this);
|
|
|
|
submoduleList.Add(transformSubmodule);
|
|
submoduleList.Add(timeDurationSubmodule);
|
|
submoduleList.Add(colorSubmodule);
|
|
}
|
|
}
|
|
|
|
namespace Beatmap
|
|
{
|
|
public class SubstantialObject_BM : GameElement_BM
|
|
{
|
|
public string themeBundleName;
|
|
public string objectName;
|
|
|
|
public SubstantialObject_BM()
|
|
{
|
|
|
|
}
|
|
|
|
public SubstantialObject_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM attachedElement,
|
|
string themeBundleName, string objectName)
|
|
: base(elementName, elementGuid, tags, attachedElement)
|
|
{
|
|
this.themeBundleName = themeBundleName;
|
|
this.objectName = objectName;
|
|
}
|
|
|
|
public override void ExecuteBM()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public override GameElement DuplicateBM(GameElement attached)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|
|
} |