public void MakeOneWay() { mSprites.MakeOneWay(); mSpriteFrames.MakeOneWay(); mTexts.MakeOneWay(); // The SpriteGrids is not a two-way list }
public override void Destroy() { // Generated Destroy AttackEnemyFactory.Destroy(); AttackPlayerFactory.Destroy(); GameScreenGum.InstanceDestroy(); GameScreenGum = null; AttackEnemyList.MakeOneWay(); AttackPlayerList.MakeOneWay(); if (EnemyInstance != null) { EnemyInstance.Destroy(); EnemyInstance.Detach(); } if (PlayerInstance != null) { PlayerInstance.Destroy(); PlayerInstance.Detach(); } for (int i = AttackEnemyList.Count - 1; i > -1; i--) { AttackEnemyList[i].Destroy(); } for (int i = AttackPlayerList.Count - 1; i > -1; i--) { AttackPlayerList[i].Destroy(); } if (CursorEntityInstance != null) { CursorEntityInstance.Destroy(); CursorEntityInstance.Detach(); } if (LastEnemyMoveText != null) { LastEnemyMoveText.RemoveFromManagers(); } AttackEnemyList.MakeTwoWay(); AttackPlayerList.MakeTwoWay(); base.Destroy(); CustomDestroy(); }
public override void Destroy() { // Generated Destroy BulletFactory.Destroy(); EnemyBulletFactory.Destroy(); if (mStartLevel != null) { mStartLevel.Destroy(); mStartLevel = null; } if (mLevel2 != null) { mLevel2.Destroy(); mLevel2 = null; } if (mLevel3 != null) { mLevel3.Destroy(); mLevel3 = null; } if (mLevel4 != null) { mLevel4.Destroy(); mLevel4 = null; } if (mEndLevel != null) { mEndLevel.Destroy(); mEndLevel = null; } BulletList.MakeOneWay(); NextLevelEntityList.MakeOneWay(); SignEntityList.MakeOneWay(); ActionEntityList.MakeOneWay(); EnemyBulletList.MakeOneWay(); EnemyCornerList.MakeOneWay(); GroundEnemyList.MakeOneWay(); if (TiledMap != null) { TiledMap.Destroy(); } if (TileCollisionShapes != null) { TileCollisionShapes.RemoveFromManagers(ContentManagerName != "Global"); } for (int i = BulletList.Count - 1; i > -1; i--) { BulletList[i].Destroy(); } for (int i = NextLevelEntityList.Count - 1; i > -1; i--) { NextLevelEntityList[i].Destroy(); } if (PlayerInstance != null) { PlayerInstance.Destroy(); PlayerInstance.Detach(); } for (int i = SignEntityList.Count - 1; i > -1; i--) { SignEntityList[i].Destroy(); } for (int i = ActionEntityList.Count - 1; i > -1; i--) { ActionEntityList[i].Destroy(); } for (int i = EnemyBulletList.Count - 1; i > -1; i--) { EnemyBulletList[i].Destroy(); } for (int i = EnemyCornerList.Count - 1; i > -1; i--) { EnemyCornerList[i].Destroy(); } for (int i = GroundEnemyList.Count - 1; i > -1; i--) { GroundEnemyList[i].Destroy(); } if (EntityCollisionShapes != null) { EntityCollisionShapes.RemoveFromManagers(ContentManagerName != "Global"); } if (EnemyCollisionGround != null) { EnemyCollisionGround.RemoveFromManagers(ContentManagerName != "Global"); } if (TheEndText != null) { TextManager.RemoveText(TheEndText); } BulletList.MakeTwoWay(); NextLevelEntityList.MakeTwoWay(); SignEntityList.MakeTwoWay(); ActionEntityList.MakeTwoWay(); EnemyBulletList.MakeTwoWay(); EnemyCornerList.MakeTwoWay(); GroundEnemyList.MakeTwoWay(); base.Destroy(); CustomDestroy(); }