I'm creating a Java game similar to Mario Bros. I'm using Tiled Map Editor to create the map, inside the map there is water. I want to make my character swims inside water, for instance, changing the animation and make it floats. But, my character just sinks. I don't know how to implement these things inside my program, although, I succeed with collision.
Can anyone help me please?