-
-
Notifications
You must be signed in to change notification settings - Fork 219
/
Layout.cs
30 lines (25 loc) · 732 Bytes
/
Layout.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ProceduralToolkit.Buildings
{
public abstract class Layout : ILayout
{
public Vector2 origin { get; set; }
public float width { get; set; }
public float height { get; set; }
private readonly List<ILayoutElement> elements = new List<ILayoutElement>();
public IEnumerator<ILayoutElement> GetEnumerator()
{
return elements.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public virtual void Add(ILayoutElement element)
{
elements.Add(element);
}
}
}