problème : Il y avait plusieurs manières de faire planter le loading screen en appuyant sur des boutons changements: - turn off buttons when loading screen is active - turn on buttons when loading screen is not active - add event aggregator class to project and migrate every event to it - fix bugs and regressions
35 lines
950 B
C#
35 lines
950 B
C#
using System.Collections.Generic;
|
|
using UnityEngine.Tilemaps;
|
|
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
namespace GatherAndDefend.LevelEditor
|
|
{
|
|
public class Level : ScriptableObject, IEnumerable<TilemapData>
|
|
{
|
|
private Rect _bounds;
|
|
public Rect Bounds => _bounds;
|
|
[SerializeField]
|
|
private List<TilemapData> _data = new List<TilemapData>();
|
|
[SerializeField]
|
|
private WaveConfig _waveConfig;
|
|
public void SaveFromTilemap(Tilemap tilemap)
|
|
{
|
|
var data = new TilemapData();
|
|
data.SaveFromTilemap(tilemap);
|
|
_data.Add(data);
|
|
}
|
|
|
|
public WaveConfig WaveConfig { get { return _waveConfig; } }
|
|
|
|
public IEnumerator<TilemapData> GetEnumerator()
|
|
{
|
|
return _data.GetEnumerator();
|
|
}
|
|
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return _data.GetEnumerator();
|
|
}
|
|
}
|
|
} |