Well, if it's not a burglary.. and we're talking about some person just showing up randomly then I'd keep calm and try to ask some questions first.
Back in 1984 on a cold winter night, when I was going through literal hell - addicted to heroin, financial difficulties and I'm talking about no electricity at home and just enough food to survive, psychosis, divorce, dealing with my best friend's death.. I won't go too much into details but just to get an idea about the mental state I was in. So, it was quite late at night and I left home just wandering, walking around the neighborhood and thinking about things.. then I remembered that my best friend that I mentioned was planning to move to one of the blocks nearby and for some reason I just went into that building and started walking up the stairs. On about 5th floor, a man just opened the door of his apartment and as he was leaving and locking the door, I politely asked if he could give me a glass of water. I wasn't dying of thirst, but wasn't feeling too well either, so didn't think much about it when I asked. Waiting for his answer, he just dodged me in a kind of a very rude way saying something along to get the hell out of there. It all happened in just a few seconds, but as soon as he did that I got filled with the worst rage, disgust and even thinking about someone else being there in place of me who could really be dying of thirst and it just made me turn into some kind of monster and dragged him down the stairs as I had my arms around his neck just so that he could barely breathe. As he was shouting for help and neighbors from that floor started opening their doors, an old lady asked me what the hell was going on, so I just shortly explained that I asked him for a glass of water. A few more seconds passed, I still have him pinned down and that old lady suddenly gives me a glass of water. Then once the situation calmed down a bit, cops showed up also immediately and I was taken to the police department. Luckily, after explaining it all they let me go and even drove me back. So.. yeah, that's what the other side of the story could be in case of a random person showing up nearby, you never know. Just to be clear, I never showed any aggression or threat, just in a very polite manner asked the man for a glass of water. Also, it wasn't in 1984, but it was about 10 years ago when I was still really young. It all just felt like George Orwell's 1984, although I've never read that book either.