You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
645 B

  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. [CreateAssetMenu(menuName = "Major Project/Editable Block")]
  4. public class EditableBlock : CombinedBlock
  5. {
  6. public override LogicBlock[] GetAllBlocks()
  7. {
  8. List<LogicBlock> retVal = new List<LogicBlock>();
  9. retVal.Add(this);
  10. foreach (LogicBlock block in blockReader.LogicChain)
  11. retVal.AddRange(block.GetAllBlocks());
  12. return retVal.ToArray();
  13. }
  14. public override int Size()
  15. {
  16. int retVal = 1;
  17. foreach (LogicBlock block in blockReader.LogicChain)
  18. retVal += block.Size();
  19. return retVal;
  20. }
  21. }