public void RegisterPersonage(Transform tr, MinimapEntityType entityType, int entParam = -1) { if (entityType == MinimapEntityType.LocalCharacter) { mainTr = tr; updateCoroutine = StartCoroutine(_UpdateCharactersPos()); } else if (entityType == MinimapEntityType.OtherCharacter) { CreateEntityView(tr, otherPlayerPrefab); otherPlayersTr.Add(tr); } else // if ( entityType == MinimapEntityType.Crystal ) { GameObject crystalPrefab = crystalEntityPrefabs[entParam]; CreateEntityView(tr, crystalPrefab); } }
public void SetEntityType(MinimapEntityType type) { entityType = type; }