Esempio n. 1
0
        private void UpdateEmotions(IAppraisalFrame frame)
        {
            if (_lastFrameAppraisal >= frame.LastChange)
            {
                return;
            }

            var emotions = m_occAffectDerivator.AffectDerivation(this, frame);

            foreach (var emotion in emotions)
            {
                var activeEmotion = m_emotionalState.AddEmotion(emotion);
                if (activeEmotion == null)
                {
                    continue;
                }

                //foreach (var processor in m_emotionalProcessors)
                //{
                //	processor.EmotionActivation(this, activeEmotion);
                //}
            }

            _lastFrameAppraisal = frame.LastChange;
        }
        private void UpdateEmotions(IAppraisalFrame frame, Dictionary <string, Goal> goals, IEmotionalState emotionalState, AM am)
        {
            var emotions = m_occAffectDerivator.AffectDerivation(this, goals, frame);

            foreach (var emotion in emotions)
            {
                var activeEmotion = emotionalState.AddEmotion(emotion, am, GetEmotionDisposition(emotion.EmotionType), am.Tick);
                if (activeEmotion == null)
                {
                    continue;
                }
            }
        }
        private void UpdateEmotions(IAppraisalFrame frame, IEmotionalState emotionalState, AM am)
        {
            if (_lastFrameAppraisal > frame.LastChange)
            {
                return;
            }

            var emotions = m_occAffectDerivator.AffectDerivation(this, frame);

            foreach (var emotion in emotions)
            {
                var activeEmotion = emotionalState.AddEmotion(emotion, am, GetEmotionDisposition(emotion.EmotionType), am.Tick);
                if (activeEmotion == null)
                {
                    continue;
                }
            }

            _lastFrameAppraisal = frame.LastChange;
        }