コード例 #1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (roomba.GetPathType() == PathType.WallFollow)
     {
         if (col.IsTouching(wallSensor) && col.gameObject.tag != "whiskers" && col.gameObject.tag != "vacuum")
         {
             roomba.GetPath().SetIsTouching(true);
             ++count;
         }
     }
 }
コード例 #2
0
 void Start()
 {
     roomba = GetComponentInParent <Roomba>();
     path   = roomba.GetPath();
 }