using UnityEngine;
using UnityEngine.UI ;
using System.Collections ;
public class Score : MonoBehaviour {
// Use this for initialization
public Text score;
public int counter= 0 ;
void Start( ) {
score.text = "Score: " +counter;
}
void OnCollisionEnter2D( Collision2D targetHit) {
if ( targetHit.gameObject .name == "yoba_pechalnii" ) {
counter+= 1 ;
score.text = "Score: " +counter;
}
}
} # your code goes here
dXNpbmcgVW5pdHlFbmdpbmU7CnVzaW5nIFVuaXR5RW5naW5lLlVJOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnM7CgpwdWJsaWMgY2xhc3MgU2NvcmUgOiBNb25vQmVoYXZpb3VyIHsKCgkvLyBVc2UgdGhpcyBmb3IgaW5pdGlhbGl6YXRpb24KCXB1YmxpYyBUZXh0IHNjb3JlOwoJcHVibGljIGludCBjb3VudGVyPTA7CgoJdm9pZCBTdGFydCgpewoJCQoJCXNjb3JlLnRleHQ9IlNjb3JlOiAiK2NvdW50ZXI7CgoJfQoJdm9pZCBPbkNvbGxpc2lvbkVudGVyMkQoQ29sbGlzaW9uMkQgdGFyZ2V0SGl0KXsKCQlpZiAodGFyZ2V0SGl0LmdhbWVPYmplY3QubmFtZSA9PSAieW9iYV9wZWNoYWxuaWkiKSB7CgkJY291bnRlcis9MTsKCQlzY29yZS50ZXh0ID0gIlNjb3JlOiAiK2NvdW50ZXI7CgkJfQp9Cgp9CSMgeW91ciBjb2RlIGdvZXMgaGVyZQ==
compilation info
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/py_compile.py", line 117, in compile
raise py_exc
py_compile.PyCompileError: File "prog.py", line 1
using UnityEngine;
^
SyntaxError: invalid syntax
stdout