Well, i have observed this from my neighborhood, that most of them have turned into gamblers. Maybe heredity still counts as whatever the tree, so is the fruit. But having an environment that is full of gamblers may also have a big effect on the young ones. It's like their young minds have been motivated that gambling can make them rich, or the reason that they don't struggles in life. However, when they grow old and mature, they will eventually discover the real effects of gambling, and its their choice whether to do the same or just get rid of gambling.
Me as well, my neighbor turned their house into a small mahjong place wherein most of them are the players and other of my neighbors as well. I remember a time that a police came to their house but due to the influence of the owner in the compound, police turn around and left. It is prohibited to play a local gambling without a permit and license from the government, but people will still play since there will be a chance that they will get more money when they win. Environment do affects a person behavior and also what will he about to do in his life in the future, but that doesn't mean be cannot be change, gambling addiction doesn't run in the blood.
Environment do affect. But the OP is about the transfer of gambling from parents to kids - which is not possible - because not all the kids become gamblers if the parents are gamblers. However it is also one of the possibility that gamblers kids refuse to gamble incase they dislike gambling.