Example #1
0
    public void SellPie()
    {
        PieSpot spot = GetRandomPieSpot();

        if (spot != null)
        {
            spot.RemovePie();
            GameManager.Instance.GetMoneyManager().SellPie();
        }
    }
Example #2
0
    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);
    }
Example #3
0
    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);
    }
Example #4
0
 public void PutInSpot(PieSpot spot)
 {
     currentSpot = spot;
 }