Esempio n. 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer.Equals(LayerMask.NameToLayer("BallDrop")))
     {
         BallDrop ballDrop = other.GetComponent <BallDrop>();
         characterInfo.playerScore += ballDrop.ballScore;
         Destroy(ballDrop.gameObject);
     }
 }
Esempio n. 2
0
 private void Start()
 {
     characterInfo = GetComponentInParent <CharacterInfo>();
     ballDrop      = ballDropPrefab.GetComponent <BallDrop>();
 }