Conceivably the statements are intended as foreshadowing, “a literary device in which an author hints certain plot developments that perhaps will come to be later in the story”. But if the event is going to happen in the next few seconds rather than somewhat later, the phrases may be serving as a segue, “a smooth transition from one topic or section to the next”, or it might be setting the scene.
Foreshadowing sometimes is referred to as adumbration, meaning “A vague indication of what is to come”. When the adumbration is awfully clear or heavy-handed, it is referred to as being on the nose, and that's the term I’m inclined to suggest for the examples in the question. This meaning is different from several other meanings of on the nose, such as “Exact; precise; appropriate”; or betting on a win; or smelling bad. Instead, it's the usage portrayed in the following on-the-nose excerpt from “Desperate Housewives”, mentioned in a thread at wordreference.com:
Bob and Lee, two gay friends, are giving a Halloween party, Katherine arrives, disguised as Queen Marie Antoinette, and these are the lines:
LEE - You came as a self-important queen who lost all her power? Isn't that a bit on the nose?
KATHERINE - Lee making jokes about a queen. Isn't that a bit ironic?
The term also is defined at the TV Tropes entry for “On The Nose Dialog”:
This is a term scriptwriters use when describing things that are clearly shown in a scene already. Thus pointing them out becomes painfully redundant.
A Sub Trope of Show Don’t Tell, where the showing is left out, but the telling still should be. ... Compare Captain Obvious.