protected override objectSpawner makeObjSpawn(string tag) { objectSpawner currentObject = null; if (tag == "Log") { return(new log()); } if (tag == "Stump") { return(new stump()); } if (tag == "Ice") { return(new ice()); } if (tag == "Slope") { return(new slope()); } return(currentObject); }
public objectSpawner GetObject(string tag) { objectSpawner currentObject = makeObjSpawn(tag); currentObject.position(); currentObject.rotation(); currentObject.scale(); currentObject.tag(); return(currentObject); }
public void loadNextScene() { if (SceneManager.GetActiveScene().name == "SampleScene") { SceneManager.LoadScene("FullMap"); } else if (SceneManager.GetActiveScene().name == "FullMap" || SceneManager.GetActiveScene().name == "Mini_Game_1" || SceneManager.GetActiveScene().name == "Mini_Game_2") { SceneManager.LoadScene("SampleScene"); objectspawner = GameObject.Find("plc").GetComponent <objectSpawner>(); } if (resetButton.gameObject.activeSelf) { resetButton.gameObject.SetActive(false); } if (loadScenesButton.gameObject.activeSelf) { loadScenesButton.gameObject.SetActive(false); } }