Esempio n. 1
0
 // Handle give hay & take bale
 private bool InteractOnceWithBarn(Barn barn)
 {
     if (state == PlayerState.HasHay && barn.state == BarnState.Empty && team == barn.team)
     {
         barn.StartProcessingHay();
         state = PlayerState.Empty;
         gameObject.GetComponent <PUN2_PlayerSync>().callPlayHayInteractionSound();
         gameObject.GetComponent <PUN2_PlayerSync>().callChangePlayerState(0);
         return(true);
     }
     else if (state == PlayerState.Empty && barn.GetBale())
     {
         state = PlayerState.HasBale;
         gameObject.GetComponent <PUN2_PlayerSync>().callPlayHayInteractionSound();
         gameObject.GetComponent <PUN2_PlayerSync>().callChangePlayerState(2);
         timeSincePickupObj = 0f;
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
    public void GetBarnBale()
    {
        Barn barn = (Barn)localScripts[0];

        barn.GetBale();
    }