The thing following "as if" is always an "imagined" thing, in some sense. It may be something contrary to fact, or it may be something used as a comparison (in order to say that one thing is like another). A and B are understood to mean that the thing following "as if" is contrary to fact.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
GPYA and B are understood to mean that the thing following "as if" is contrary to fact. (If "nothing had happened" isn't true, then something happened.)However, "He talks as if he knows everything", though probably by default understood to mean that he doesn't know everything, could mean that the speaker has the impression that he does know everything