submarine: Fix submarine taking input on tutorial
The controls of the submarine was getting affected even when the
tutorial is still visible, which is avoided by placing a
!tutorial.visible
check for both keyboard inputs and MouseArea inputs. The input won't
be a valid one if tutorial.visible returns true.
In 42e9414 "submarine: Improved coding structure", the label under a
Ballast tank was placed in a separate Rectangle component present under
the Ballast tank. This resulted in the bar overriding the ballast tank
labels. The approach is changed by making the GCText component as a
child of the Ballast tank itself, instead of creating a new Rectangle
component under it.
On changing the level while the smoothHorizontalVelocity is still
running, the effect would get reflected on the next level, since
the animation is still running.
Avoiding this by calling smoothHorizontalVelocity.stop() under
resetSubmarine() function.
Crown capturing and upper gate opening and closing is done directly
by changing the property, to avoid breaking the binding.
Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>