This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void LoadMap(GameObject mapPrefab, string playerSpawnPoint) | |
| { | |
| // map is of type Gameobject | |
| map = Instantiate(mapPrefab, this.transform); | |
| cinemachineConfiner.m_BoundingShape2D = map.gameObject.GetComponent<Collider2D>(); | |
| cinemachineConfiner.InvalidatePathCache(); | |
| var spawnPointTranform = GetComponentsInChildren<SpawnPoint>() | |
| .First(item => item.gameObject.name == playerSpawnPoint) | |
| .transform; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DefaultTmxImporter : CustomTmxImporter | |
| { | |
| public override void TmxAssetImported(TmxAssetImportedArgs args) | |
| { | |
| var map = args.ImportedSuperMap; | |
| CreateColliderForCameraConfiner(map); | |
| } | |
| private static void CreateColliderForCameraConfiner(SuperMap map) | |
| { |