public void Handle(List <CollisionObject> collisionList) { foreach (CollisionObject Info in collisionList) { if (collisionMatrix.ContainsKey(Info)) { Object[] paramaters = new object[2]; paramaters[0] = Info; paramaters[1] = level; if (Info.LeftSlot is WarpPipe && (Info.RightSlot is Mario || Info.RightSlot is StarMario)) { paramaters = new object[3]; paramaters[0] = Info; paramaters[1] = level; paramaters[2] = game; } ICollisionHandler Handler = (ICollisionHandler)collisionMatrix[Info].Invoke(paramaters); Handler.Execute(); } } }