You can't implement a C# interface in JS directly. The best you can do is implement it in C# and call to JS functions. Use the VirtualButtons sample as a starting point, the Scripts/VirtualButtonEventHandler.cs script in particular.
If you do call to JS functions you'll need to place your JS classes in the Plugins folder (or some folder that Unity compiles in an earlier phase). See this guide for more details: http://unity3d.com/support/documentation/ScriptReference/index.Script_compilation_28Advanced29.html
You can't implement a C# interface in JS directly. The best you can do is implement it in C# and call to JS functions. Use the VirtualButtons sample as a starting point, the Scripts/VirtualButtonEventHandler.cs script in particular.
If you do call to JS functions you'll need to place your JS classes in the Plugins folder (or some folder that Unity compiles in an earlier phase). See this guide for more details: http://unity3d.com/support/documentation/ScriptReference/index.Script_compilation_28Advanced29.html
- Kim