submodule fix
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
@@ -16,6 +17,14 @@ namespace Ichni.RhythmGame
|
||||
public SubmoduleBase(GameElement attachedGameElement)
|
||||
{
|
||||
this.attachedGameElement = attachedGameElement;
|
||||
|
||||
if (attachedGameElement.submoduleList.Any(x => x.GetType() == this.GetType()))
|
||||
{
|
||||
Debug.LogWarning("存在重复的Submodule");
|
||||
LogWindow.Log($"There are repeated submodule on Game Element {attachedGameElement.elementName}", Color.yellow);
|
||||
return;
|
||||
}
|
||||
|
||||
this.attachedGameElement.submoduleList.Add(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user