void playerDie() { for (loopVar1 = 0; loopVar1 < gameEntities.Count; loopVar1++) { if (gameEntities[loopVar1] is IGameActor) { tmpActor = gameEntities[loopVar1] as IGameActor; tmpActor.TakeMessage("PlayerDied"); } } myUiLogic.playerDied(); }