using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[CreateAssetMenu(menuName = "Major Project/Editable Block")]
|
|
public class EditableBlock : CombinedBlock
|
|
{
|
|
|
|
public override LogicBlock[] GetAllBlocks()
|
|
{
|
|
List<LogicBlock> retVal = new List<LogicBlock>();
|
|
retVal.Add(this);
|
|
|
|
foreach (LogicBlock block in blockReader.LogicChain)
|
|
retVal.AddRange(block.GetAllBlocks());
|
|
|
|
return retVal.ToArray();
|
|
}
|
|
|
|
public override int Size()
|
|
{
|
|
int retVal = 1;
|
|
foreach (LogicBlock block in blockReader.LogicChain)
|
|
retVal += block.Size();
|
|
|
|
return retVal;
|
|
}
|
|
|
|
|
|
}
|