public void SetAssociatedBlob(int blobId, GameObject blob) { associatedBlob = blob; blobDragSpawner = associatedBlob.GetComponent <BlobDragSpawner>(); blobDragSpawner.blobDragSpawnerUi = this; blobDragSpawner.associatedBlobId = blobId; SetIcon(SaveSystem.saveData.blobData[blobId].blobType); }
public Dictionary <int, Vector3> GetSelectedBlobIds() { Dictionary <int, Vector3> selectedBlobTransforms = new Dictionary <int, Vector3>(); foreach (Transform blobTransform in playerSpawnPoints.transform) { BlobDragSpawner blobDragSpawner = blobTransform.gameObject.GetComponent <BlobDragSpawner>(); if (blobTransform.gameObject.activeSelf && !blobDragSpawner.isColliding) { selectedBlobTransforms.Add(blobDragSpawner.associatedBlobId, blobTransform.position); } } return(selectedBlobTransforms); }