submarine: Improved coding structure

Authored by rudranilbasu on Jul 8 2017, 5:59 PM.

Description

submarine: Improved coding structure

The running component of the Ballast Tank's timers are directly set to
the values of waterFilling and waterFlushing, to avoid calling start()
and stop() separately
The whale's image source is changed once using isHit ? ... : ... instead
of setting changing it using a function, just the value of "isHit" is
changed. Same for the submarine
Changed 0x0000 to Fixture.None
Removed setting of processingAnswer to true twice in finishLevel()
Added labels for the three Ballast tanks
Control panel's variables are set directly using aliases instead of
assigning via separate variables
Fixed enginePosition typo
Removed console.log statements

Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>

Details

Committed
rudranilbasuJul 8 2017, 5:59 PM
Parents
R2:e34f7550c1a7: submarine: rotation: Smoothed submarine rotation
Branches
Unknown
Tags
Unknown
Restricted Application added a subscriber: jjazeix. ยท View Herald TranscriptJul 8 2017, 6:09 PM
jjazeix added inline comments.Jul 9 2017, 2:54 PM
/src/activities/submarine/BallastTank.qml
72

waterFilling && !waterFlushing to avoid having it running when both are switched at same time? (same below)

rudranilbasu marked an inline comment as done.Jul 9 2017, 3:33 PM
rudranilbasu added inline comments.
/src/activities/submarine/BallastTank.qml
72