private void EnemyDied(EventInfo eventInfo) { EnemyDiedEventInfo info = (EnemyDiedEventInfo)eventInfo; if (info.killerPlayer != null) { PlayerStats stats; switch (info.killerPlayer.Id) { case 1: stats = p1Stats; break; case 2: stats = p2Stats; break; default: stats = p1Stats; break; } if (info.killedSameColor) { stats.EnemyKilledOk(info.color, info.specialKill); } else { stats.EnemyKilledWrong(); } } }
private void WormSectionDestroyed(EventInfo eventInfo) { EnemyDiedEventInfo info = (EnemyDiedEventInfo)eventInfo; --colorCount[(int)info.color]; if (colorCount[(int)info.color] < 0) { colorCount[(int)info.color] = 0; } }
private void EnemyDied(EventInfo eventInfo) { EnemyDiedEventInfo info = (EnemyDiedEventInfo)eventInfo; --colorCount[(int)info.color]; if (colorCount[(int)info.color] < 0) { colorCount[(int)info.color] = 0; } }