4 namespace droid.Runtime.Prototyping.Evaluation {
8 [AddComponentMenu(EvaluationComponentMenuPath._ComponentMenuPath
10 + EvaluationComponentMenuPath._Postfix)]
11 [RequireComponent(typeof(Rigidbody))]
13 [SerializeField]
string _avoid_tag =
"balls";
14 [SerializeField]
int _hits = 0;
18 [SerializeField] GameObject _player = null;
27 var tagged_gos = GameObject.FindGameObjectsWithTag(this._avoid_tag);
29 foreach (var ball
in tagged_gos) {
32 if (!publisher || publisher.Caller !=
this) {
37 publisher.OnCollisionEnterDelegate = this.OnChildCollision;
42 void OnChildCollision(GameObject child_sensor_game_object, Collision collision) {
43 if (collision.collider.name ==
this._player.name) {
49 Debug.Log(this._hits);
54 void ResetHits() { this._hits = 0; }
override void PostSetup()
override void InternalReset()
override float InternalEvaluate()