Modified NGUI to use delegate

Tutorial code clean up and bug fix