public static void LookForConversation(GameObject gameObject, NeedStatus socialNeed)
        {
            General.General generalComponent     = gameObject.GetComponent <General.General>();
            NeedStatus      generalOneSocialNeed = generalComponent.GetNeed(NeedType.SOCIAL);

            var general1ConverseData = new ConverseData
            {
                ReadyToTalk = false,
                General     = generalComponent,
                SocialNeed  = generalOneSocialNeed
            };

            gameObject.GetComponent <Character2D>().Tasks.AddToStack(new ConverseTask(general1ConverseData));
        }
        private bool CheckIfConversationPartnerIsNear()
        {
            float             closestGeneralDistance = float.MaxValue;
            Room              generalRoom            = _converseData.General.GetComponent <Character2D>().CurrentRoom;
            List <GameObject> generals = GameManager.Instance().GeneralList
                                         .Where(general => general != _converseData.General.gameObject &&
                                                general.GetComponent <Character2D>().CurrentRoom == generalRoom &&
                                                general.GetComponent <Character2D>().Tasks.IsConcurrentCurrentTaskActive() == false).ToList();

            if (generals.Count <= 0)
            {
                return(false);
            }

            General.General closestGeneral = generals.Aggregate((general1, general2) =>
            {
                closestGeneralDistance = Math.Abs(general1.transform.position.x - _converseData.General.transform.position.x);
                float generalDistance  = Math.Abs(general2.transform.position.x - _converseData.General.transform.position.x);
                if (closestGeneralDistance > generalDistance)
                {
                    return(general2);
                }
                return(general1);
            })
                                             .GetComponent <General.General>();

            closestGeneralDistance = Math.Abs(closestGeneral.transform.position.x - _converseData.General.transform.position.x);
            if (closestGeneralDistance > 1)
            {
                return(false);
            }

            Debug.Log(_converseData.General.Name.FullName() + " is close to " + closestGeneral.Name.FullName() + " and will try to initiate conversation");
            _converseData.General.GetComponent <Character2D>().Tasks.PauseCurrentTask();
            closestGeneral.GetComponent <Character2D>().Tasks.PauseCurrentTask();
            closestGeneral.GetComponent <Character2D>().Tasks.FlushConcurrentTasks();
            _converseData.ConversationPartnerTaskData = new ConverseData
            {
                ConversationPartnerTaskData = _converseData,
                General     = closestGeneral,
                SocialNeed  = closestGeneral.GetNeed(NeedType.SOCIAL),
                ReadyToTalk = true
            };
            closestGeneral.GetComponent <Character2D>().Tasks.AddToStack(new ConverseTask(_converseData.ConversationPartnerTaskData));

            _converseData.ReadyToTalk = true;
            GenerateConversation();
            return(true);
        }