Modif utilisation générique des IGrabable quand action sans hit

This commit is contained in:
Antoine H 2020-12-10 15:38:47 +01:00
parent 825de9e1b1
commit ed07f1332e
2 changed files with 11 additions and 13 deletions

View file

@ -14,7 +14,12 @@ public class Mug : MonoBehaviour, IGrabable
//TODO: Gérer objets tavernier (drop) et autres
public bool use(GameObject userObject)
{
//Do nothing
if(userObject.tag=="Player")
{
// Debug.Log(gameObject.name+" dropped by "+userObject.name);
drop(userObject.transform.position);
return true; //Object taken (on the floor)
}
return false; //Return wether the object is taken from tavernkeeper
}
public void take() //Object taken