private GameObject InstantiateZone(ScoreZoneSettingsContainer.Shapes zoneType) { if (zoneType == ScoreZoneSettingsContainer.Shapes.Cube) { return((GameObject)Instantiate(CubeScoreZonePrefab)); } else { return(null); } }
public GameObject InstantiateZone(ScoreZoneSettingsContainer.Shapes zoneType) { Vector3 instantiateSpot = Camera.main.ViewportToWorldPoint(new Vector3(0.5f, 0.5f, ObjInstantiationDistance)); // 0 is cube // 1 is cone if (zoneType == ScoreZoneSettingsContainer.Shapes.Cube) { GameObject zone = (GameObject)Instantiate(CubeScoreZonePrefab, instantiateSpot, Quaternion.identity); scoreZones.Add(zone); CurrentlySelected = zone; return(zone); } else { return(null); // We realistically never will be returning null since only cube is implimented rn } }