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.

31 lines
675 B

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