Пример #1
0
    public void Interact(PlayerController pController)
    {
        Gastro gastroInHand = pController.pDatas.gastroInHand;

        if (gastroInHand == null)
        {
            if (isEmpty == true)
            {
                GameManager.Instance.PopUp.CreateText("Le chariot est vide", 50, new Vector2(0, 300), 3.0f);
            }
            else // Take gastro
            {
                TakeGastro(pController);
            }
        }
        else
        {
            if (isFull == true)
            {
                GameManager.Instance.PopUp.CreateText("Le chariot est plein", 50, new Vector2(0, 300), 3.0f);
            }
            else// Put gastro
            {
                if (gastroInHand.haveObject == false)
                {
                    PutGastro(pController);
                }
                else
                {
                    GameManager.Instance.PopUp.CreateText("Impossible de poser un gastro remplie", 50, new Vector2(0, 300), 3.0f);
                }
            }
        }
    }
Пример #2
0
    public void Interact(PlayerController pController)
    {
        player = pController;
        Gastro gastroInHand = player.pDatas.gastroInHand;

        if (gastroInHand != null) // Put object in trolley
        {
            Aliment actualAliment = gastroInHand.alimentStocked;
            if (actualAliment != null && (actualAliment.alimentState == AlimentState.Cooked || actualAliment.alimentState == AlimentState.Cut || actualAliment.alimentState == AlimentState.Standard || actualAliment.alimentState == AlimentState.Clean))
            {
                onUse = true;

                PutObjectInTrolley(actualAliment);
            }
            else
            {
                GameManager.Instance.PopUp.CreateText("Le gastro ne contient pas d'aliment", 50, new Vector2(0, 300), 3.0f);
            }
        }
        else // check température
        {
            player.pDatas.temperatureInMind = true;
            GameManager.Instance.PopUp.CreateText("Température relevée", 50, new Vector2(0, 300), 3.0f);
        }
    }
Пример #3
0
    public void ThrowObject(PlayerController _pController, Poolable _food)
    {
        Gastro gastroInHand = _pController.pDatas.gastroInHand;

        if (gastroInHand != null)
        {
            gastroInHand.ReleaseObject(true, true, false);
        }
        else
        {
            _pController.pInteract.ReleaseObject(true, true, false);
        }
        _food.photonView.RPC("DelObjectOnline", RpcTarget.Others);
        _food.DelObject();
        if (nbOfElementInTrash == 0)
        {
            wasteItem.SetActive(true);
        }
        nbOfElementInTrash++;
        wasteItem.transform.position = initPosWasteItem + Vector3.up * 0.1f * nbOfElementInTrash;

        GameManager.Instance.Audio.PlaySound("Trash", AudioManager.Canal.SoundEffect);

        photonView.RPC("ThrowObjectOnline", RpcTarget.Others, _pController.photonView.OwnerActorNr);
    }
Пример #4
0
    public bool CanInteract(PlayerController pController)
    {
        GrabableObject objectInHand = pController.pDatas.objectInHand;

        if (objectInHand != null)
        {
            Gastro  gastroInHand  = pController.pDatas.gastroInHand;
            Aliment alimentInHand = pController.pDatas.objectInHand.GetComponent <Aliment>();

            if (haveAnObject == false && (gastroInHand != null || alimentInHand != null))
            {
                return(true);
            }
        }
        return(false);
    }
Пример #5
0
    void PutObjectInTrolley(Aliment _aliment)
    {
        // Affect the players
        Gastro gastroInHand = player.pDatas.gastroInHand;

        grabableReceived = gastroInHand.ReleaseObject(false, false, false);
        alimentStocked.Add(_aliment);
        grabableReceived.AllowGrab(true);
        grabableReceived.gameObject.GetComponent <Poolable>().DelObject();
        grabableReceived = null;

        photonView.RPC("PutObjectInTrolleyOnline", RpcTarget.Others, player.photonView.OwnerActorNr);
        player = null;
        onUse  = false;

        gastroInHand.transform.position = gastroPos.position;
        gastroInHand.gameObject.SetActive(false);
    }
Пример #6
0
    void PutObjectInTrolleyOnline(int _actorNumber)
    {
        PlayerController photonPlayer = InGamePhotonManager.Instance.PlayersConnected[_actorNumber];

        Gastro gastroInHand = photonPlayer.pDatas.gastroInHand;

        grabableReceived = gastroInHand.ReleaseObject(false, false, false);

        Aliment playerAliment = grabableReceived.GetComponent <Aliment>();

        alimentStocked.Add(playerAliment);
        grabableReceived.AllowGrab(true);
        grabableReceived.gameObject.GetComponent <Poolable>().DelObject();
        grabableReceived = null;
        onUse            = false;

        gastroInHand.transform.position = gastroPos.position;
        gastroInHand.gameObject.SetActive(false);
    }
Пример #7
0
    //Open fridge and play opening animation
    public void Interact(PlayerController pController)
    {
        Gastro         gastroInHand = pController.pDatas.gastroInHand;
        GrabableObject handPlayer   = pController.pDatas.objectInHand;

        if (handPlayer != null)
        {
            Poolable food;
            if (gastroInHand != null)
            {
                Aliment alimentToThrow = gastroInHand.alimentStocked;
                if (alimentToThrow != null)
                {
                    food = gastroInHand.alimentStocked.GetComponent <Poolable>();
                }
                else
                {
                    GameManager.Instance.PopUp.CreateText("Aucun élément à jeter", 50, new Vector2(0, 300), 3.0f);
                    return;
                }
            }
            else
            {
                food = handPlayer.GetComponent <Poolable>();
            }

            if (food != null)
            {
                if (nbOfElementInTrash == nbMaxOfElement)
                {
                    GameManager.Instance.PopUp.CreateText("Poubelle pleine", 50, new Vector2(0, 300), 3.0f);
                }
                else
                {
                    ThrowObject(pController, food);
                }
            }
        }
        else if (nbOfElementInTrash > 0)
        {
            CleanTrash(pController);
        }
    }
Пример #8
0
    private void FinishActionOnline(string _nameAliment, int _alimentState, int _timeInSecond, bool instantiateViewID, int _objectEmptyViewID, int _objectStackViewID)
    {
        Gastro  gastroOnPost = grabableReceived.GetComponent <Gastro>();
        Aliment aliment;

        if (gastroOnPost != null)
        {
            aliment = gastroOnPost.alimentStocked;
        }
        else
        {
            aliment = grabableReceived.GetComponent <Aliment>();
        }


        aliment.alimentName  = _nameAliment;
        aliment.alimentState = (AlimentState)_alimentState;

        TakeSample(aliment, instantiateViewID);

        objectCooked.GetComponent <PhotonView>().ViewID = _objectEmptyViewID;
        objectSample.GetComponent <PhotonView>().ViewID = _objectStackViewID;
        currentStartAction = null;
    }
Пример #9
0
        public IActionResult Report()
        {
            string OPDNO = HttpContext.Session.GetString("Gastro_OPDNO");

            if (OPDNO != null && OPDNO != String.Empty)
            {
                Gastro data = new Gastro
                {
                    UserData = _db.UserDatas.Where(c => c.OPDNo == OPDNO).FirstOrDefault(),
                    GastroClinicalSymptom    = _gmidb.GastroClinicalSymptoms.Where(c => c.OPDNO == OPDNO).FirstOrDefault(),
                    GastroComorbidity        = _gmidb.GastroComorbidities.Where(c => c.OPDNO == OPDNO).FirstOrDefault(),
                    GastroPersonalHabit      = _gmidb.GastroPersonalHabits.Where(c => c.OPDNO == OPDNO).FirstOrDefault(),
                    GastroGeneralExamination = _gmidb.GastroGeneralExaminations.Where(c => c.OPDNO == OPDNO).FirstOrDefault(),
                    GastroCNS           = _gmidb.GastroCNSs.Where(c => c.OPDNO == OPDNO).FirstOrDefault(),
                    GastroRespSystem    = _gmidb.GastroRespSystems.Where(c => c.OPDNO == OPDNO).FirstOrDefault(),
                    GastroAbdExam       = _gmidb.GastroAbdExams.Where(c => c.OPDNO == OPDNO).FirstOrDefault(),
                    GastroCVS           = _gmidb.GastroCVSs.Where(c => c.OPDNO == OPDNO).FirstOrDefault(),
                    GastroInvestigation = _gmidb.GastroInvestigations.Where(c => c.OPDNO == OPDNO).FirstOrDefault(),
                    GastroOther         = _gmidb.GastroOthers.Where(c => c.OPDNO == OPDNO).FirstOrDefault()
                };
                return(View(data));
            }
            return(RedirectToAction("Index", new { res = "First enter OPDNO" }));
        }
    /// <summary>
    /// Use of Disinfection Post
    /// </summary>
    /// <param name="pController"></param>
    public void Interact(PlayerController pController)
    {
        player = pController;
        GrabableObject objectInHand = player.pDatas.objectInHand;
        Gastro         gastroInHand = player.pDatas.gastroInHand;

        // Put object = No object on post and object in hand of player
        if (haveAnObject == false && objectInHand != null)
        {
            if (grabableReceived == null)
            {
                Aliment actualAliment;
                if (gastroInHand != null)
                {
                    actualAliment = gastroInHand.alimentStocked;
                }
                else
                {
                    actualAliment = objectInHand.GetComponent <Aliment>();
                }
                if (actualAliment != null && actualAliment.alimentState == AlimentState.InContent)
                {
                    if (player.pDatas.gastroInHand != null)
                    {
                        grabableReceived = player.pDatas.gastroInHand.ReleaseObject(false, false, false);
                    }
                    else
                    {
                        grabableReceived = player.pInteract.ReleaseObject(false, false, false);
                    }
                    grabableReceived.AllowGrab(false);
                    grabableReceived.transform.position = initPos.position;
                    grabableReceived.transform.rotation = initPos.rotation;

                    haveAnObject = true;

                    Aliment newAliment = grabableReceived.GetComponent <Aliment>();

                    // Affect the player
                    player.TeleportTo(playerPosition, true);
                    player.BeginInteractionState();

                    // transform dirty aliment into fresh aliment
                    if (newAliment != null)
                    {
                        GeneralError.ErrorNoOutfit(pController);
                        currentStartAction = StartCoroutine(StartAction(newAliment, transformationTime, true, true));
                    }

                    photonView.RPC("PutObjectInPost", RpcTarget.Others, pController.photonView.OwnerActorNr);
                }
                else
                {
                    GameManager.Instance.PopUp.CreateText("Cet object ne peut pas être déposé ici", 50, new Vector2(0, 300), 3.0f);
                }
            }
        }
        else if (objectInHand != null && haveAnObject == true)
        {
            GameManager.Instance.PopUp.CreateText("Il y a actuellement un objet sur le poste", 50, new Vector2(0, 300), 3.0f);
        }
    }
Пример #11
0
    //Set Player who use ColdRoom
    public void Interact(PlayerController pController)
    {
        gameManager.FreeMouse();

        player = pController;

        if (player.pDatas.objectInHand == null)
        {
            ui.DisplayUiMenu(); // Display Menu
        }
        else                    // put object in coldRoom
        {
            Gastro gastroInHand = pController.pDatas.gastroInHand;

            if (gastroInHand == null)
            {
                Aliment   foodToAdd = player.pDatas.objectInHand.GetComponent <Aliment>();
                Nominator nominator = player.pDatas.objectInHand.GetComponent <Nominator>();

                if (foodToAdd == null)                 // EXIT IF NO ALIMENT FOUND
                {
                    GameManager.Instance.PopUp.CreateText("Imossible de placer " + nominator.customName + " dans la chambre froide", 50, new Vector2(0, 300), 3.0f);
                    return;
                }

                photonView.RPC("PutObjectInColdRoom", RpcTarget.Others, player.photonView.OwnerActorNr);

                if ((foodToAdd.alimentState == AlimentState.Stack || foodToAdd.alimentState == AlimentState.Box))                 // unlimited Food
                {
                    if (!foodsStocked.Contains(foodToAdd.CreateKeyPairValue()))
                    {
                        AddFood(foodToAdd.CreateKeyPairValue(), true);
                        player.pInteract.ReleaseObject(true, true, false);
                        foodToAdd.GetComponent <Poolable>().DelObject();                        // !!! chose : put food in pool (or put it on shelf)
                        GeneralError.ErrorNoOutfit(pController);
                        GameManager.Instance.PopUp.CreateText(nominator.customName + " déposé", 50, new Vector2(0, 300), 3.0f);
                    }
                    else
                    {
                        player.pInteract.ReleaseObject(true, true, false);
                        foodToAdd.GetComponent <Poolable>().DelObject();                        // !!! chose : put food in pool (or put it on shelf)
                        GeneralError.ErrorNoOutfit(pController);
                        GameManager.Instance.PopUp.CreateText(nominator.customName + " déposé", 50, new Vector2(0, 300), 3.0f);
                    }
                }
                else                                                                      // limited food
                {
                    if (!limitedFoodsStocked.ContainsKey(foodToAdd.CreateKeyPairValue())) //first deposit
                    {
                        AddFood(foodToAdd.CreateKeyPairValue(), true);
                        player.pInteract.ReleaseObject(true, true, false);
                        foodToAdd.GetComponent <Poolable>().DelObject();                        // !!! chose : put food in pool (or put it on shelf)
                        GeneralError.ErrorNoOutfit(pController);
                        GameManager.Instance.PopUp.CreateText(nominator.customName + " déposé", 50, new Vector2(0, 300), 3.0f);
                    }
                    else
                    {
                        limitedFoodsStocked[foodToAdd.CreateKeyPairValue()] += 1;
                        player.pInteract.ReleaseObject(true, true, false);
                        foodToAdd.GetComponent <Poolable>().DelObject();                        // !!! chose : put food in pool (or put it on shelf)
                        GeneralError.ErrorNoOutfit(pController);
                        GameManager.Instance.PopUp.CreateText(nominator.customName + " déposé", 50, new Vector2(0, 300), 3.0f);
                    }
                }
            }
            else
            {
                GameManager.Instance.PopUp.CreateText("Il n'est pas possible de déposer/utiliser un gastro ici", 50, new Vector2(0, 300), 3.0f);
            }
        }
    }
Пример #12
0
    public void Interact(PlayerController pController)
    {
        player = pController;

        GrabableObject objectInHand = player.pDatas.objectInHand;
        Gastro         gastroInHand = player.pDatas.gastroInHand;

#if UNITY_EDITOR
        Debug.Log("objectInHand is NUll :" + (objectInHand == null));
        Debug.Log("boxToUnpack is NUll : " + (grabableReceived == null));
        Debug.Log("boxToGive is NUll: " + (objectSample == null));
#endif

        if (objectInHand != null && haveAnObject == false)
        {
            if (grabableReceived == null)
            {
                Aliment actualAliment;
                if (gastroInHand != null)
                {
                    actualAliment = gastroInHand.alimentStocked;
                }
                else
                {
                    actualAliment = objectInHand.GetComponent <Aliment>();
                }

                if (actualAliment != null && (actualAliment.alimentState == AlimentState.Cooked || actualAliment.alimentState == AlimentState.Cut || actualAliment.alimentState == AlimentState.Standard || actualAliment.alimentState == AlimentState.Clean))
                {
                    // Put Object on post
                    grabableReceived = player.pInteract.ReleaseObject(false, false, false);
                    grabableReceived.AllowGrab(false);
                    grabableReceived.transform.position = initPos.position;
                    grabableReceived.transform.rotation = initPos.rotation;

                    haveAnObject = true;

                    // Affect the player
                    player.TeleportTo(playerPosition, true);
                    player.BeginInteractionState();


                    // transform box into crate
                    if (actualAliment != null)
                    {
                        currentStartAction = StartCoroutine(StartAction(actualAliment, transformationTime, true, true));
                    }

                    //photonView.RPC("PutObjectOnSampleStation", RpcTarget.Others, player.photonView.OwnerActorNr);
                }
                else
                {
                    GameManager.Instance.PopUp.CreateText("L'aliment n'est pas préparé", 50, new Vector2(0, 300), 3.0f);
                }
            }
        }
        else if (objectInHand != null && haveAnObject == true)
        {
            GameManager.Instance.PopUp.CreateText("Il y a actuellement un objet sur le poste", 50, new Vector2(0, 300), 3.0f);
        }
    }
Пример #13
0
    /// <summary>
    /// Use of Disinfection Post
    /// </summary>
    /// <param name="pController"></param>
    public void Interact(PlayerController pController)
    {
        player = pController;
        GrabableObject objectInHand = pController.pDatas.objectInHand;
        Gastro         gastroInHand = player.pDatas.gastroInHand;

        // Put object = No object in furnace and object in hand of player
        if (haveAnObject == false)
        {
            if (grabableReceived == null)
            {
                Aliment actualAliment;
                if (gastroInHand != null)
                {
                    actualAliment = gastroInHand.alimentStocked;
                }
                else
                {
                    actualAliment = objectInHand.GetComponent <Aliment>();
                }

                if (actualAliment != null && actualAliment.alimentState >= AlimentState.Standard && actualAliment.alimentState <= AlimentState.Sample)
                {
                    AlimentObject actualAlimentObject = FoodDatabase.mapAlimentObject[actualAliment.alimentName];

                    bool alimenStateExist = false;

                    for (int i = 0; i < actualAlimentObject.listState.Count; i++)
                    {
                        if (actualAlimentObject.listState[i].state == AlimentState.Cooked)
                        {
                            alimenStateExist = true;
                            break;
                        }
                    }
                    if (alimenStateExist)
                    {
                        if (gastroInHand != null)
                        {
                            grabableReceived = player.pDatas.gastroInHand.ReleaseObject(false, false, false);
                        }
                        else
                        {
                            grabableReceived = player.pInteract.ReleaseObject(false, false, false);
                        }
                        grabableReceived.AllowGrab(false);
                        grabableReceived.transform.position = foodPos.position;
                        grabableReceived.transform.rotation = foodPos.rotation;

                        haveAnObject = true;

                        Aliment newAliment = grabableReceived.GetComponent <Aliment>();

                        // Affect the player
                        player.TeleportTo(playerPosition, true);
                        player.BeginInteractionState();

                        // transform dirty aliment into fresh aliment
                        if (newAliment != null)
                        {
                            currentStartAction = StartCoroutine(StartAction(newAliment, transformationTime, true));
                            photonView.RPC("StartActionOnline", RpcTarget.Others, pController.photonView.OwnerActorNr);
                        }
                    }
                    else
                    {
                        GameManager.Instance.PopUp.CreateText("Cet aliment ne peut pas être cuit", 50, new Vector2(0, 300), 3.0f);
                    }
                }
                else
                {
                    GameManager.Instance.PopUp.CreateText("Cet object ne peut pas être déposé ici", 50, new Vector2(0, 300), 3.0f);
                }
            }
        }
        else if (haveAnObject == true && objectInHand != null)
        {
            if (gastroInHand != null && gastroInHand.alimentStocked == null)
            {
                StartCoroutine(TakeFood());
            }
        }
        else if (objectInHand == null && haveAnObject == true)  // Take object = object in furnace and no object in hand of player
        {
            StartCoroutine(TakeFood());
        }
        else if (gastroInHand != null && haveAnObject == true) // put object impossible = object in furnace and object in hand of player
        {
            GameManager.Instance.PopUp.CreateText("Il y a actuellement un objet dans la sauteuse", 50, new Vector2(0, 300), 3.0f);
        }
    }
Пример #14
0
    public void Interact(PlayerController pController)
    {
        player = pController;
        GrabableObject objectInHand = player.pDatas.objectInHand;
        Gastro         gastroInHand = pController.pDatas.gastroInHand;

        // Put object = No object on post and object in hand of player
        if (haveAnObject == false && objectInHand != null)
        {
            if (gastroInHand == null)
            {
                if (grabableReceived == null)
                {
                    Aliment actualAliment = objectInHand.GetComponent <Aliment>();
                    string  alimentType   = actualAliment.alimentType.ToString();
                    string  postType      = typeOfTreament.ToString();

                    if (alimentType == postType)
                    {
                        sameState = true;
                    }
                    else
                    {
                        sameState = false;
                    }

                    Debug.Log(alimentType);
                    Debug.Log(postType);
                    Debug.Log(sameState);

                    if (actualAliment != null && (actualAliment.alimentState == AlimentState.InContent || actualAliment.alimentState == AlimentState.Standard))
                    {
                        AlimentObject actualAlimentObject = FoodDatabase.mapAlimentObject[actualAliment.alimentName];

                        bool alimenStateExist = false;
                        for (int i = 0; i < actualAlimentObject.listState.Count; i++)
                        {
                            if (actualAlimentObject.listState[i].state == AlimentState.Clean)
                            {
                                alimenStateExist = true;
                                break;
                            }
                        }

                        if (sameState && alimenStateExist)
                        {
                            grabableReceived = player.pInteract.ReleaseObject(false, false, false);
                            grabableReceived.AllowGrab(false);
                            grabableReceived.AllowPhysic(false);
                            grabableReceived.transform.position = initPos.position;
                            grabableReceived.transform.rotation = initPos.rotation;

                            haveAnObject = true;

                            Aliment newAliment = grabableReceived.GetComponent <Aliment>();

                            // Affect the player
                            player.TeleportTo(playerPosition, true);
                            player.BeginInteractionState();

                            // transform dirty aliment into fresh aliment
                            if (newAliment != null)
                            {
                                GeneralError.ErrorNoOutfit(pController);
                                currentStartAction = StartCoroutine(StartAction(newAliment, transformationTime, true, true));
                            }

                            photonView.RPC("PutObjectInPost", RpcTarget.Others, pController.photonView.OwnerActorNr);
                        }
                        else
                        {
                            GameManager.Instance.PopUp.CreateText("Cet Objet ne peut pas être déposé ici", 50, new Vector2(0, 300), 3.0f);
                        }
                    }
                    else if (objectInHand != null && haveAnObject == true)
                    {
                        GameManager.Instance.PopUp.CreateText("Il y a actuellement un objet sur le poste", 50, new Vector2(0, 300), 3.0f);
                    }
                    else
                    {
                        GameManager.Instance.PopUp.CreateText("Cet Objet ne peut pas être déposé ici", 50, new Vector2(0, 300), 3.0f);
                    }
                }
            }
            else
            {
                GameManager.Instance.PopUp.CreateText("Il n'est pas possible d'utiliser un gastro ici", 50, new Vector2(0, 300), 3.0f);
            }
        }
        else
        {
            GameManager.Instance.PopUp.CreateText("Cet object ne peut pas être déposé ici", 50, new Vector2(0, 300), 3.0f);
        }
    }
Пример #15
0
    /// <summary>
    /// Use of Disinfection Post
    /// </summary>
    /// <param name="pController"></param>
    public void Interact(PlayerController pController)
    {
        player = pController;
        GrabableObject objectInHand = player.pDatas.objectInHand;
        Gastro         gastroInHand = player.pDatas.gastroInHand;

        // Put object = No object in furnace and object in hand of player
        if (haveAnObject == false && objectInHand != null)
        {
            if (grabableReceived == null)
            {
                Aliment actualAliment;
                if (gastroInHand != null)
                {
                    actualAliment = gastroInHand.alimentStocked;
                }
                else
                {
                    actualAliment = objectInHand.GetComponent <Aliment>();
                }
                if (actualAliment != null && (actualAliment.alimentState == AlimentState.Standard || actualAliment.alimentState == AlimentState.Clean))
                {
                    AlimentObject actualAlimentObject = FoodDatabase.mapAlimentObject[actualAliment.alimentName];

                    bool alimenStateExist = false;

                    for (int i = 0; i < actualAlimentObject.listState.Count; i++)
                    {
                        if (actualAlimentObject.listState[i].state == AlimentState.Cut)
                        {
                            alimenStateExist = true;
                            break;
                        }
                    }
                    if (alimenStateExist)
                    {
                        if (player.pDatas.gastroInHand != null)
                        {
                            grabableReceived = player.pDatas.gastroInHand.ReleaseObject(false, false, false);
                        }
                        else
                        {
                            grabableReceived = player.pInteract.ReleaseObject(false, false, false);
                        }
                        grabableReceived.AllowGrab(false);
                        grabableReceived.transform.position = foodPos.position;
                        grabableReceived.transform.rotation = foodPos.rotation;

                        haveAnObject = true;

                        Aliment newAliment = grabableReceived.GetComponent <Aliment>();

                        // Affect the player
                        player.TeleportTo(playerPosition, true);
                        player.BeginInteractionState();

                        // transform dirty aliment into fresh aliment
                        if (newAliment != null)
                        {
                            GeneralError.ErrorNoOutfit(pController);
                            currentStartAction = StartCoroutine(StartAction(newAliment, transformationTime, true, true));
                        }

                        photonView.RPC("PutObjectInPost", RpcTarget.Others, pController.photonView.OwnerActorNr);
                    }
                    else
                    {
                        GameManager.Instance.PopUp.CreateText("Cet aliment ne peut pas être coupé", 50, new Vector2(0, 300), 3.0f);
                    }
                }
                else
                {
                    GameManager.Instance.PopUp.CreateText("Cet object ne peut pas être déposé ici", 50, new Vector2(0, 300), 3.0f);
                }
            }
        }
        else if (objectInHand == null && haveAnObject == true)  // Take object = object in furnace and no object in hand of player
        {
            if (player.pDatas.gastroInHand != null)
            {
                if (player.pDatas.gastroInHand.StockAliment(objectCutted, true) == false)
                {
                    GameManager.Instance.PopUp.CreateText("impossible de mettre " + objectCutted.GetComponent <Aliment>().alimentName + " dans le gastro", 50, new Vector2(0, 300), 3.0f);
                }
            }
            else
            {
                if (player.pInteract.GrabObject(objectCutted, true) == false)
                {
                    GameManager.Instance.PopUp.CreateText("impossible de prendre " + objectCutted.GetComponent <Aliment>().alimentName + " dans vos mains", 50, new Vector2(0, 300), 3.0f);
                }
            }
        }
        else if (objectInHand != null && haveAnObject == true) // put object impossible = object in furnace and object in hand of player
        {
            GameManager.Instance.PopUp.CreateText("Il y a actuellement un objet sur le poste", 50, new Vector2(0, 300), 3.0f);
        }
    }