Ignore:
Timestamp:
2015-06-26 03:34:53 (5 years ago)
Author:
mijoliim
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2015/26/MikkoL/JRPG/JRPG/JRPG/Overworld/OverworldView.cs

    r6281 r6415  
    1010    public static MapData CurrentMapData { get; set; } 
    1111    public static CollisionMap CurrentCollisionMap { get; set; } 
     12    public static List<GameObject> IWater = new List<GameObject>(); 
    1213 
    1314    public static void TestMap() 
     
    4041                    Water.Animation.Start(); 
    4142                    JRPG.Game.Add(Water, -3); 
     43                    IWater.Add(Water); 
    4244                } 
    4345 
     
    5254    public static bool CheckIfMapAndCMapMatches() 
    5355    { 
    54         if (CurrentMap == null && CurrentCollisionMap == null) throw new NullReferenceException("Map and CollisionMap are not loaded."); 
     56        if (CurrentMap == null || CurrentCollisionMap == null) throw new NullReferenceException("Map and/or CollisionMap are not loaded."); 
    5557 
    5658        if (CurrentMap.Width / 40 == CurrentCollisionMap.CollisionMapArray.GetLength(0) 
     
    6264    } 
    6365 
    64      
     66    public static void Destroy() 
     67    { 
     68        CurrentMap.Destroy(); 
     69        CurrentMap = null; 
     70        CurrentCollisionMap = null; 
     71        CurrentMapData = null; 
     72 
     73        for (int i = 0; i < IWater.Count; i++) 
     74        { 
     75            IWater[i].Destroy(); 
     76        } 
     77    } 
    6578 
    6679} 
Note: See TracChangeset for help on using the changeset viewer.