Example #1
0
 void CreateBarn(Vector3 position)
 {
     if (barn == null)
     {
         barn = (BarnController)Instantiate(barnPrefab, position, Quaternion.identity);
         barn.carController = car;
         barn.BarnEnter    += new BarnEnterEventHandler(BarnEnter);
     }
     barn.GetTransform().position = position + new Vector3(0, 0, 30);
 }
Example #2
0
    public void BarnEnter(BarnController barn)
    {
        //int newlyCollected = car.GetCargo().Count;

        //update the score...
        //scoreController.addCollected
        foreach (CreatureController c in car.GetCargo())
        {
            hudController.CreatureReturnedToBarn(c);
        }
        car.ClearCargo();
    }