ManiaMap.Unity
Procedural generation of metroidvania style maps for Unity.
ActiveCellsRow.cs
1using System.Collections.Generic;
2using System.Linq;
3using UnityEngine;
4
6{
10 [System.Serializable]
11 public struct ActiveCellsRow
12 {
13 [SerializeField]
14 private List<bool> _values;
18 public List<bool> Values { get => _values; set => _values = value; }
19
24 public ActiveCellsRow(List<bool> values)
25 {
26 _values = values;
27 }
28
34 public ActiveCellsRow(int count, bool value)
35 {
36 _values = Enumerable.Repeat(value, count).ToList();
37 }
38 }
39}
The row of the RoomComponent active cells list.
ActiveCellsRow(List< bool > values)
Initializes a new struct.
List< bool > Values
The cell activities for the row.
ActiveCellsRow(int count, bool value)
Initializes a new struct.