rb-/unity-game-controllers — pull request #1 by capnslipp (2014-05-21 07:33:48+00:00)
Title: Converted music-player/-trigger to C#

Converted music-player and music-player-trigger to C#, as the todo in the header requested. Seems to work as it did before.

Some things changed along the way:
• File/class name changed to C#-standard “UpperCamelCase”.
• [HideInInspector] fields changed to more-appropriate private fields.
• C# naming standards: private fields underscore-prefixed, public fields “lowerCamelCase”, method names “UpperCamelCase”.
• Float number literals (both existing and ints that would be up-casted at runtime) suffixed with `f`.
• All local var and property access prefixed with `this.`.
• Pre-fetch of repeatedly-used objects at beginning of method (esp. `AudioSource audio`).
• Renamed some private vars to make more grammatical sense (`is`-prefix instead of redundant `Bool`-suffix).
• Corountine-using method (`FadeOutCorountine()`) wrapped in a non-corountine caller (`FadeOut()`).
• Space after `if` (since it's not a method), no space after method names.
• Unnecessary curly braces removed.