コード例 #1
0
 public override void OnCollide(CustomCollider collider)
 {
     if (collider.CompareTag("Obstacle"))
     {
         ToState((int)PlayerState.Falling);
     }
     if (collider.CompareTag("Floor"))
     {
         ToState((int)PlayerState.Dead);
     }
 }
コード例 #2
0
 public override void OnCollide(CustomCollider collider)
 {
     if (collider.CompareTag("Player"))
     {
         ScoreManager.Instance.CurrentScore += 1;
         gameObject.SetActive(false);
     }
 }