Add DisposeAll.
This commit is contained in:
@@ -95,7 +95,7 @@ namespace Cryville.Crtr.Event {
|
||||
#endregion
|
||||
|
||||
#region Logic
|
||||
/// Called upon StartUpdate of ps 17.
|
||||
#region Init methods: Called on prehandle
|
||||
public virtual void PreInit() {
|
||||
gogroup = new GameObject(TypeName + ":" + Container.GetHashCode().ToString(CultureInfo.InvariantCulture)).transform;
|
||||
SkinContext = new SkinContext(gogroup);
|
||||
@@ -113,14 +113,7 @@ namespace Cryville.Crtr.Event {
|
||||
public virtual void PostInit() {
|
||||
gogroup.gameObject.SetActive(false);
|
||||
}
|
||||
public virtual void Dispose() {
|
||||
if (Disposed) return;
|
||||
Disposed = true;
|
||||
if (gogroup)
|
||||
GameObject.Destroy(gogroup.gameObject);
|
||||
// gogroup.gameObject.SetActive(false);
|
||||
Alive = false;
|
||||
}
|
||||
#endregion
|
||||
protected virtual void PreAwake(ContainerState s) {
|
||||
if (gogroup) {
|
||||
gogroup.gameObject.SetActive(true);
|
||||
@@ -174,6 +167,12 @@ namespace Cryville.Crtr.Event {
|
||||
}
|
||||
}
|
||||
}
|
||||
public virtual void Dispose() {
|
||||
if (gogroup)
|
||||
GameObject.Destroy(gogroup.gameObject);
|
||||
Alive = false;
|
||||
}
|
||||
public virtual void DisposeAll() { }
|
||||
#region Anchor
|
||||
public virtual void Anchor() {
|
||||
skinContainer.MatchDynamic(cs);
|
||||
|
Reference in New Issue
Block a user