void Start() { forestGen = GameObject.FindGameObjectWithTag("ForestGen").GetComponent <ForestGen>(); player = GetComponent <CharacterController>(); playerAudSource = GetComponent <AudioSource>(); mouseLook = Camera.main.GetComponent <camMouseLook>(); jumping = false; canMove = true; }
/// <summary> /// generate the type of map /// </summary> /// <param name="map">map to be used</param> /// <param name="type">type of map to generate</param> /// <returns>true upon success, otherwise false</returns> public static bool generate(Map map, MapType type) { //set type map.MapDef.MapType = type; m_CurrentMapType = type; //call appropriate generator and generate the map switch (type) { case MapType.CAVE: return(CaveGen.generate(map, m_Params)); case MapType.CITY: break; case MapType.DUNGEON: return(DungeonGen.generate(map, m_Params)); case MapType.FORT: break; case MapType.OUTPOST: break; case MapType.NEXUS: break; case MapType.TOWER: break; case MapType.TOWN: break; case MapType.WORLD: return(WorldGen.generate(map, m_Params)); case MapType.WILDERNESS: return(ForestGen.generate(map, m_Params)); default: return(false);//no map created } //no map was created return(false); }