private void CreateDeadIcon(SmuckPlayer p, DeadIconType type) { int dIndex = deadIcons.Count; DeadIcon di; if (this is SteamRollerScreen) { di = (DeadIcon)CreateInstanceAt("flatteningPlayer" + (int)p.gamePadIndex, "deadIcons" + dIndex, p.X, p.Y, 0, iconDepthCount++); } else if (p.isExploding) { di = (DeadIcon)CreateInstanceAt("explodingPlayer", "deadIcons" + dIndex, p.X, p.Y, 0, iconDepthCount++); } else { di = (DeadIcon)CreateInstanceAt("deadIcon", "deadIcons" + dIndex, p.X, p.Y, 0, iconDepthCount++); } // Compact framework doesn't support Enum.GetValues di.IconType = (DeadIconType)1;// (DeadIconType)rnd.Next(deadIconCount); di.Depth = iconDepthCount; di.PlayheadWrap += new AnimationEvent(di_PlayheadWrap); di.Play(); }