You can walk with God even when nobody around you does.
Noah lived in a generation filled with violence, and he still walked with God.
Genesis 6:9 (KJV): These are the generations of Noah: Noah was a just man and perfect in his generations, and Noah walked with God.
Walking with God means agreeing with Him, not with the crowd.
Amos 3:3 (KJV): Can two walk together, except they be agreed?
Noah did not let his generation shape him. We are not to be conformed to this world either.
Romans 12:2 (KJV): And be not conformed to this world: but be ye transformed by the renewing of your mind, that ye may prove what is that good, and acceptable, and perfect, will of God.
God saw one righteous man in a whole generation, and He called him into the ark.
Genesis 7:1 (KJV): And the LORD said unto Noah, Come thou and all thy house into the ark; for thee have I seen righteous before me in this generation.