void Start() { map = player.GetComponentInChildren<MiniMap> (); pc = player.GetComponent<PlayerCollider> (); switch (mapId) { case 1: map.InitializeMap (MapDatas.map1); break; case 2: map.InitializeMap (MapDatas.map2); break; } }