openDS-oss icon indicating copy to clipboard operation
openDS-oss copied to clipboard

Add reward on successful action

Open breznak opened this issue 8 years ago • 1 comments

on correctly passing an obstacle, after several minutes of driving, on passing a cognitively demanding situation... give a reward (play a song, green screen with trophy icon, ...) Make this an optional functionality, so the impact can be validated

Subtask of #24

breznak avatar Jun 07 '16 15:06 breznak

OK, here's an updated plan:

  • [ ] implement means to show/act on reward:
    • [x] show text/image (e.g :+1: ) on screen ... https://github.com/breznak/openDS/issues/32#issuecomment-253496420
    • [x] play a sound: cz.cvut.utils.PlaySound(String pathToFile)
    • [ ] change screen color/flash/blink cz.cvut.utils.Utils.changeScreenColor(Color c, int timeoutMs, bool smooth) // static method, extract from DarkeningDistraction
  • [ ] refactor DisctractionClass
    • [x] merge in it functionality of ListOfDistractions
    • [ ] abstract void showReward() //can also do nothing
    • [x] require int reward in constructor
    • update global reward on collection
    • [ ] "automatically" detect when/if reward is collected, write to log
    • [ ] remove DistractionSettings, hold the info in DistractionClass.settings hashmap

breznak avatar Oct 13 '16 12:10 breznak