Exemplo n.º 1
0
    public static void UpdateSystemAt(int x, int y)
    {
        float startTime = Time.realtimeSinceStartup;

        SubregionSystem.UpdateSubregionAt(x, y);
        ResetRegions();
        CreateRegions();
    }
Exemplo n.º 2
0
    public void Reset()
    {
        foreach (var node in nodes)
        {
            node.subregion = null;
        }
        nodes.Clear();

        /*
         * for (int i = nodes.Count - 1; i >= 0; i--) {
         *  RemoveNode(nodes[i]);
         * }
         */

        for (int i = neighbouringSubregions.Count - 1; i >= 0; i--)
        {
            RemoveNeighbour(neighbouringSubregions[i]);
        }

        region?.RemoveSubregion(this);

        SubregionSystem.RemoveSubregion(this);
    }
Exemplo n.º 3
0
 public static void Initialize()
 {
     SubregionSystem.CreateSubregions();
     CreateRegions();
 }
Exemplo n.º 4
0
 public static void Reset()
 {
     regions?.Clear();
     SubregionSystem.Reset();
 }