Exemplo n.º 1
0
 public Material temporaryColor;   //set in Inspector: material for the temporary line
 // Start is called before the first frame update
 void Start()
 {
     lastMousePosition = new Vector3(0, 0, 0); //have a Vector3 ready
     ic      = new IntersectionChecker();
     spawner = this.gameObject.GetComponent <SpawnObject>();
     camera  = GameObject.FindGameObjectsWithTag("MainCamera")[0].GetComponent <Camera>();
     SetupNewObject();         //set up a first object to be drawn
 }
    public void test4()
    {
        IntersectionChecker i = new IntersectionChecker();
        Edge road             = new Edge(new Node(20, 155), new Node(75, 200), RoadTypes.STREET);

        i.fixRoad(road);
        RoadVisualizer.placeRoad(road, "0");
    }
    public override Boolean Intersects(Shape other)
    {
        if (other is Rectangle)
        {
            return(IntersectionChecker.Intersect(this, (Rectangle)other));
        }
        else if (other is Circle)
        {
            return(IntersectionChecker.Intersect(this, (Circle)other));
        }

        throw new NotSupportedException();
    }