TxAggie brings up some good points about where laws apply. One of the more common questions that I am asked about at work is about private property and what it means.
There are two "P" words that people often confuse as far as the law is concerned. Those are PRIVATE Property and PUBLIC Place. As an officer I have heard many people say something like.... "but it was private property".
Private property can very much be a public place. A store parking lot is private property as far as ownership. It is owned by an individual or by a company. They have complete control over the property. Just because it is private property does not mean that the parking lot or the interior of the store is not "public" however. When laws say that something is illegal in a "public place", ownership has almost no bearing. It is access that is the determining factor.
The Texas Penal Code defines Public Place as - "Public place" means any place to which the public or a substantial group of the public has access and includes, but is not limited to, streets, highways, and the common areas of schools, hospitals, apartment houses, office buildings, transport facilities, and shops". Obviously, in most cases shops, office buildings, hospitals, etc., are privately owned. They are still very much a public place under many laws.
This applies to laws such as carrying weapons, sexual conduct, disorderly conduct, public intoxication, DWI, some assaults, etc. You can't have sex in the middle aisle of your Wal-Mart just because it is private property.
That means even in your gated community, much of it is a public place even though it may be private property.