public void MoveInListener(MoveInEvent moveInEvent)
        {
            long index = _grid.GetNodeIndex(moveInEvent.Current);

            if (!_chests.Contains(index))
            {
                return;
            }
            _chests.Remove(index);

            Action action = new Action(_actionDefinition);

            action.AddParam("gold", 1500);

            DynamicActionEvent dynamicActionEvent = new DynamicActionEvent(action, _actionAnswers, moveInEvent.MoveToNextEvent.Owner);

            _eventBus.Post(dynamicActionEvent);
            Debug.WriteLine("Chest Taken");
        }
        public void MoveInListener(MoveInEvent moveInEvent)
        {
            long index = _grid.GetNodeIndex(moveInEvent.Current);

            if (!_habitats.Contains(index))
            {
                return;
            }

            Habitat habitat = _nodeToEntityLinker[index].GetComponent <Habitat>();
            Action  action  = new Action(_actionDefinition);

            action.AddParam("population", habitat.Current);
            action.AddParam("habitat", habitat);

            DynamicActionEvent dynamicActionEvent =
                new DynamicActionEvent(action, _actionAnswers, moveInEvent.MoveToNextEvent.Owner);

            _eventBus.Post(dynamicActionEvent);
            Debug.WriteLine("Recruitment Start");
        }
 public DynamicActionEvent(Action action, List <ActionAnswer> actionAnswers, Entity target = null)
 {
     Action        = action;
     ActionAnswers = actionAnswers;
     Target        = target;
 }