protected override void OnCollisionEnter(Collision collision) { if (!isPlayer && collision.collider.tag == PongBall.TAG) { PlayerVs_GameManager.GetInstance().AddNARSBlock(GetSensorimotor().GetNARSHost().type.ToString()); if (GetSensorimotor() != null) { GetSensorimotor().Praise(); } } }
private void OnTriggerEnter(Collider other) { //scored a goal if (other.tag == PongBall.TAG) { if (isNARS) //score on NARS { PlayerVs_GameManager.GetInstance().AddPlayerPoint(); //player gets a point } else if (isPlayer) //score on Player { PlayerVs_GameManager.GetInstance().AddNARSPoint(host.type.ToString()); //NARS gets a point } other.GetComponent <PongBall>().ResetPosition(); } }
private void Start() { _instance = this; }