/* * Setup when place road is first started */ public void Setup(PlaceRoad place_road) { placeRoad = place_road; // also grab components road_straight_one_component = road_straight_one.GetComponent <RoadStraight>(); road_straight_two_component = road_straight_two.GetComponent <RoadStraight>(); road_corner_component = road_corner.GetComponent <RoadCorner>(); }
public override GameObject CreateRoad(Road oldRoad) { GameObject go = base.CreateRoad(oldRoad); RoadCorner sample_corner = GameObject.Find("buildRoadCornerHighlight").GetComponent <RoadCorner>(); roadMaterialCornerTwo = sample_corner.roadMaterialCornerTwo; roadMaterialCornerThree = sample_corner.roadMaterialCornerThree; roadMaterialCornerFour = sample_corner.roadMaterialCornerFour; return(go); }
public void SetConnection(RoadCorner corner, Vector2 direction) { if (direction == new Vector2(0, 1)) { bottomConnection = corner; } else if (direction == new Vector2(1, 0)) { leftConnection = corner; } else if (direction == new Vector2(0, -1)) { topConnection = corner; } else if (direction == new Vector2(-1, 0)) { rightConnection = corner; } }
public void SetConnection(RoadCorner corner, Vector2 direction) { if (direction == new Vector2(0,1)) bottomConnection = corner; else if (direction == new Vector2(1,0)) leftConnection = corner; else if (direction == new Vector2(0,-1)) topConnection = corner; else if (direction == new Vector2(-1,0)) rightConnection = corner; }
/* * Setup when place road is first started */ public void Setup(PlaceRoad place_road) { placeRoad = place_road; // also grab components road_straight_one_component = road_straight_one.GetComponent<RoadStraight>(); road_straight_two_component = road_straight_two.GetComponent<RoadStraight>(); road_corner_component = road_corner.GetComponent<RoadCorner>(); }