Пример #1
0
    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();
            }
        }
    }
Пример #2
0
 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();
     }
 }
Пример #3
0
 private void Start()
 {
     _instance = this;
 }