}␍␊ |
else␍␊ |
{␍␊ |
Singleton<AxiosLog>.Instance.AddLine("[Axios Engine] - Adding objects too fast...remove " + gameobject.Name + " later", LoggingFlag.DEBUG);␍␊ |
AxiosLog.Instance.AddLine("[Axios Engine] - Adding objects too fast...remove " + gameobject.Name + " later", LoggingFlag.DEBUG);␍␊ |
this._objectstoremove.Add(gameobject);␍␊ |
}␍␊ |
␍␊ |
|
␍␊ |
public void RemoveAll()␍␊ |
{␍␊ |
AxiosLog.Instance.AddLine("Memory usage before cleanup: " + GC.GetTotalMemory(true).ToString(), LoggingFlag.DEBUG);␍␊ |
AxiosLog.Instance.AddLine("[Axios Engine] - Memory usage before cleanup: " + GC.GetTotalMemory(true).ToString(), LoggingFlag.DEBUG);␍␊ |
foreach (AxiosGameObject g in _gameObjects)␍␊ |
g.UnloadContent(this);␍␊ |
foreach (AxiosUIObject ui in _uiobjects)␍␊ |
|
this._gameObjects.Clear();␍␊ |
_timers.Clear();␍␊ |
_uiobjects.Clear();␍␊ |
AxiosLog.Instance.AddLine("Memory usage after cleanup: ", LoggingFlag.DEBUG);␍␊ |
AxiosLog.Instance.AddLine("[Axios Engine] - Memory usage after cleanup: ", LoggingFlag.DEBUG);␍␊ |
}␍␊ |
␍␊ |
public override void Activate(bool instancePreserved)␍␊ |
|
public override void Deactivate()␍␊ |
{␍␊ |
base.Deactivate();␍␊ |
//AxiosLog.Instance.AddLine("Memory usage before cleanup: " + GC.GetTotalMemory(true).ToString(), LoggingFlag.DEBUG);␍␊ |
AxiosLog.Instance.AddLine("Memory usage before cleanup: " + GC.GetTotalMemory(true).ToString(), LoggingFlag.DEBUG);␍␊ |
foreach (AxiosGameObject g in _gameObjects)␍␊ |
g.UnloadContent(this);␍␊ |
␍␊ |
|
this.World.Clear();␍␊ |
_timers.Clear();␍␊ |
_uiobjects.Clear();␍␊ |
//AxiosLog.Instance.AddLine("Memory usage after cleanup: " + GC.GetTotalMemory(true).ToString(), LoggingFlag.DEBUG);␍␊ |
AxiosLog.Instance.AddLine("Memory usage after cleanup: " + GC.GetTotalMemory(true).ToString(), LoggingFlag.DEBUG);␍␊ |
//AxiosRegularFile f = new AxiosRegularFile("log.log");␍␊ |
//f.WriteData(AxiosLog.Instance.GetLog(), FileMode.Append);␍␊ |
//AxiosIsolatedFile f = new AxiosIsolatedFile("log.log");␍␊ |
|
//CleanUp();␍␊ |
}␍␊ |
␍␊ |
␍␊ |
/// <summary>␍␊ |
/// This allows you to customize functionality for loading a circle item.␍␊ |
/// </summary>␍␊ |
/// <param name="circleitem"></param>␍␊ |
/// <returns></returns>␍␊ |
#if WINDOWS␍␊ |
// System.Drawing is NOT avaiable on WP7 or Xbox␍␊ |
/*␍␊ |