public void SellPie() { PieSpot spot = GetRandomPieSpot(); if (spot != null) { spot.RemovePie(); GameManager.Instance.GetMoneyManager().SellPie(); } }
private void SpawnBunny(PieSpot pieSpot) { Bunny bunnyPrefab = BunniesPrefabs[UnityEngine.Random.Range(0, BunniesPrefabs.Length)]; Bunny newBunny = Instantiate(bunnyPrefab, pieSpot.transform.position, Quaternion.identity); newBunny.SetTimeStealing(TimeBeforeStealing); newBunny.PutInSpot(pieSpot); currentBunnies.Add(newBunny); }
private List <PieSpot> GetAvailableSpots() { List <PieSpot> availableSpot = new List <PieSpot>(GameManager.Instance.GetRoundManager().GetAllPieSpots()); foreach (Bunny bun in currentBunnies) { PieSpot spot = bun.GetCurrentSpot(); if (spot != null) { availableSpot.Remove(spot); } } availableSpot.RemoveAll(x => !x.HasPie()); return(availableSpot); }
public void PutInSpot(PieSpot spot) { currentSpot = spot; }