public GameObject CreateMinimapCamera(Location MapSize, int localPlayers) { GameObject cam = (GameObject)Instantiate(MinimapCameraPrefab); cam.name = "Minimap Camera"; cam.transform.position = new Vector3((MapSize.X * 0.5f) - 0.5f, (MapSize.Y * 0.5f) - 0.5f, cam.transform.position.z); MinimapCameraData data = cam.GetComponent <MinimapCameraData>(); data.LocalPlayers = localPlayers; data.LevelSize = new Vector2(MapSize.X, MapSize.Y); return(cam); }
void Awake() { data = GetComponent <MinimapCameraData>(); consts = WorldConstants.ConstantsOwner.GetComponent <CameraConstants>(); uiConsts = WorldConstants.ConstantsOwner.GetComponent <FrontEndConstants>(); }