示例#1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.gameObject.GetComponent <obstacleBehaviour>())
     {
         scorekeeper.Increment();
     }
     else
     {
         gamekeeper.GameReset();
         scorekeeper.ResetScore();
     }
 }