コード例 #1
0
        /// <summary>
        /// Determines if an emotion is negative.
        /// </summary>
        /// <param name="emotion">The emotion to be checked</param>
        /// <returns>True if negative, false otherwise</returns>
        private bool IsNegativeEmotion(EmotionType emotion)
        {
            switch (emotion)
            {
            case EmotionType.Joy:
            case EmotionType.Pride:
            case EmotionType.Admiration:
            case EmotionType.Love:
            case EmotionType.Interest:
            case EmotionType.Gratification:
            case EmotionType.Gratitude:
            case EmotionType.Hope:
            case EmotionType.HappyFor:
            case EmotionType.Gloating:
                return(false);

            case EmotionType.Distress:
            case EmotionType.Shame:
            case EmotionType.Reproach:
            case EmotionType.Hate:
            case EmotionType.Disgust:
            case EmotionType.Remorse:
            case EmotionType.Anger:
            case EmotionType.Fear:
            case EmotionType.Resentment:
            case EmotionType.Pity:
                return(true);
            }

            return(false);
        }
コード例 #2
0
        /// <summary>
        /// Calculates the amount to which neuroticism affects a specified emotion
        /// </summary>
        /// <param name="et">The emotion to be evaluated</param>
        /// <param name="value">The intensity of the emotion</param>
        /// <returns>The amount to which neuroticism affects a specified emotion</returns>
        private double AgreeablenessFactor(EmotionType et, double value)
        {
            switch (et)
            {
            // High agreeableness = more emotions towards positive emotions towards others
            // Low agreeableness = opposite
            // (Doce et al)
            case EmotionType.Love:
            case EmotionType.HappyFor:
            case EmotionType.Pity:
            case EmotionType.Admiration:
            case EmotionType.Gratitude:
                return((Agreeableness - NEUTRAL_PERSONALITY_INTENSITY) * value);

            // High agreeableness = less emotions towards positive emotions towards others
            // Low agreeableness = opposite
            // (Doce et al)
            case EmotionType.Hate:
            case EmotionType.Resentment:
            case EmotionType.Gloating:
            case EmotionType.Reproach:
            case EmotionType.Anger:
                return((NEUTRAL_PERSONALITY_INTENSITY - Agreeableness) * value);

            default:
                return(0);
            }
        }
コード例 #3
0
 /// <summary>
 /// Sets up an emotion to influence the overall mood of the character based on the
 /// Two Dimensions of Emotion - see https://en.wikipedia.org/wiki/Emotion#/media/File:Geneva_Emotion_Wheel_-_English.png
 /// </summary>
 /// <param name="type">The type of the emotion.</param>
 /// <param name="value">The value of this emotion metric from 0 to 1. 0 is at the center of the model.</param>
 /// <param name="activationMultiplier">The impact this emotion has on the characters level of activation. 1 will mean maximum positive activation effect, 0 is no effect, -1 means maximum negative effect on activation.</param>
 /// <param name="enjoymentMultiplier">The impact this emotion has on the characters level of pleasure. 1 will mean maximum positive pleasure effect, 0 is no effect, -1 is the maximum negative effect on pleasure.</param>
 public EmotionMetric(EmotionType type, float value, float activationMultiplier, float enjoymentMultiplier)
 {
     this.type  = type;
     this.value = value;
     this.activationMultiplier = activationMultiplier;
     this.enjoymentMultiplier  = enjoymentMultiplier;
 }
コード例 #4
0
        private static float CulcDurationForType(List <Answer> answers, EmotionType type)
        {
            var   filtered = answers.Where(answer => (answer.GetRight() == type) && (answer.ElapsedTime != -1.0f));
            float duration = filtered.Sum(answer => answer.ElapsedTime);

            return(duration);
        }
コード例 #5
0
    // fonction qui permet de changer l'émotion du personnage
    public void ChangeEmotion(EmotionType emotion)
    {
        characterEmotion = emotion;

        switch (emotion)
        {
        case EmotionType.EMOTION_HAPPY:
            characterFaceRenderer.material.mainTextureOffset = new Vector2(0.0f, 0.5f);
            print("<character emotion is now HAPPY>");
            break;

        case EmotionType.EMOTION_SAD:
            characterFaceRenderer.material.mainTextureOffset = new Vector2(0.5f, 0.5f);
            print("<character emotion is now SAD>");
            break;

        case EmotionType.EMOTION_ANGRY:
            characterFaceRenderer.material.mainTextureOffset = new Vector2(0.0f, 0.0f);
            print("<character emotion is now ANGRY>");
            break;

        case EmotionType.EMOTION_FLABBERGAST:
            characterFaceRenderer.material.mainTextureOffset = new Vector2(0.5f, 0.0f);
            print("<character emotion is now FLABBERGAST>");
            break;
        }
    }
コード例 #6
0
ファイル: Character.cs プロジェクト: philvoyer/ANI2012A15
    // fonction qui permet de changer l'émotion du personnage
    public void ChangeEmotion(EmotionType emotion)
    {
        characterEmotion = emotion;

        switch(emotion)
        {
            case EmotionType.EMOTION_HAPPY:
                characterFaceRenderer.material.mainTextureOffset = new Vector2(0.0f, 0.5f);
                print("<character emotion is now HAPPY>");
                break;
            case EmotionType.EMOTION_SAD:
                characterFaceRenderer.material.mainTextureOffset = new Vector2(0.5f, 0.5f);
                print("<character emotion is now SAD>");
                break;
            case EmotionType.EMOTION_ANGRY:
                characterFaceRenderer.material.mainTextureOffset = new Vector2(0.0f, 0.0f);
                print("<character emotion is now ANGRY>");
                break;
            case EmotionType.EMOTION_FLABBERGAST:
                characterFaceRenderer.material.mainTextureOffset = new Vector2(0.5f, 0.0f);
                print("<character emotion is now FLABBERGAST>");
                break;

            default:
                print("<character emotion is unkown>");
                break;
        }
    }
コード例 #7
0
        public static float DirectionTypeToFaceApiProp(EmotionType type, EmotionScores emotion)
        {
            switch (type)
            {
            case EmotionType.Anger:
                return(emotion.Anger);

            case EmotionType.Contempt:
                return(emotion.Contempt);

            case EmotionType.Disgust:
                return(emotion.Disgust);

            case EmotionType.Fear:
                return(emotion.Fear);

            case EmotionType.Happiness:
                return(emotion.Happiness);

            case EmotionType.Neutral:
                return(emotion.Neutral);

            case EmotionType.Sadness:
                return(emotion.Sadness);

            case EmotionType.Surprise:
                return(emotion.Surprise);

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
コード例 #8
0
 public Emotion(EmotionType type, int intensity, int duration)
 {
     EmotionType       = type;
     Intensity         = intensity;
     Duration          = duration;
     IsPositiveEmotion = IsPositveEmotionType();
 }
コード例 #9
0
        public static string ToEmoji(this EmotionType type)
        {
            switch (type)
            {
            case EmotionType.Anger:
                return("\U0001F621");

            case EmotionType.Contempt:
                return("\U0001F612");

            case EmotionType.Disgust:
                return("\U0001F922");

            case EmotionType.Fear:
                return("\U0001F631");

            case EmotionType.Happiness:
                return("\U0001F600");

            case EmotionType.Neutral:
                return("\U0001F610");

            case EmotionType.Sadness:
                return("\U0001F622");

            case EmotionType.Surprise:
                return("\U0001F62F");

            default:
                return("");
            }
        }
コード例 #10
0
        public void Play(IList <float> notes)
        {
            Random random = new Random();

            foreach (var note in notes)
            {
                if (note > MaxFrequency || note < MinFrequency)
                {
                    Console.WriteLine("I can't sing it!");
                    continue;
                }

                VoiceTimbre timbre;
                EmotionType emotion = (EmotionType)random.Next(0, 3);
                if (note >= FrequencyMapper.Instance.GetHzFromNote("D5") && emotion == EmotionType.Aggressive)
                {
                    timbre = EmitScream(emotion);
                }
                else
                {
                    timbre = EmitNormally(emotion);
                }

                Console.WriteLine($"Playing {FrequencyMapper.Instance.GetNoteFromHz(note)} with timbre {timbre.Emit()}");
            }
        }
コード例 #11
0
 void Start()
 {
     emotePartGroup = this.transform.GetComponentInParent <EmotePartGroup>();
     emoteIndex     = emotePartGroup.emoteIndex;
     emotionType    = emotePartGroup.emotionType;
     character      = emotePartGroup.emoteUI.character;
 }
コード例 #12
0
 public double this[EmotionType et]
 {
     get
     {
         return(this[et, 0]);
     }
 }
コード例 #13
0
        public EmoteIndex getIndex(EmotionType emotion)
        {
            switch (emotion)
            {
            case (EmotionType.Blink): return(this.blink);

            case (EmotionType.Attack): return(this.attack);

            case (EmotionType.Hurt): return(this.hurt);

            case (EmotionType.Talk): return(this.talk);

            case (EmotionType.Emote_0): return(this.customEmote0);

            case (EmotionType.Emote_1): return(this.customEmote1);

            case (EmotionType.Emote_2): return(this.customEmote2);

            case (EmotionType.Emote_3): return(this.customEmote3);

            case (EmotionType.Emote_4): return(this.customEmote4);

            case (EmotionType.Emote_5): return(this.customEmote5);

            case (EmotionType.Emote_6): return(this.customEmote6);

            case (EmotionType.Emote_7): return(this.customEmote7);

            case (EmotionType.Emote_8): return(this.customEmote8);

            case (EmotionType.Emote_9): return(this.customEmote9);

            default: return(null);
            }
        }
コード例 #14
0
        /*
         * This method counts questions with a given emotion type
         */
        private static ushort CountByType(List <Answer> answers, EmotionType type)
        {
            List <Answer> filtered = FilterByEmotionType(answers, type);

            Debug.Assert(filtered.Count() > 0, $"Expected quantity of type '{type.ToString("G")}' to be greater then 0.");
            return(Convert.ToUInt16(filtered.Count()));
        }
コード例 #15
0
ファイル: UIEmote.cs プロジェクト: TFM-AEIS/TFM
        public void OpenType(EmotionType emotionType)
        {
            activeEmotion = emotionType;
            character.Emote(activeEmotion);
            emotionList.gameObject.SetActive(false);
            emotionEditor.gameObject.SetActive(true);
            Text   title = emotionEditor.Find("Title/Type").GetComponent <Text>();
            string name  = character.emotes.getIndex(emotionType).name;

            if (!string.IsNullOrEmpty(name))
            {
                title.text = name;
            }
            else
            {
                title.text = System.Enum.GetName(typeof(EmotionType), activeEmotion);
            }
            InputField input = emotionEditor.Find("Menu/Name/Input").GetComponent <InputField>();

            input.text = character.emotes.getIndex(activeEmotion).name;
            if (activeEmotion >= EmotionType.Blink)
            {
                input.transform.parent.gameObject.SetActive(false);
            }
            else
            {
                input.transform.parent.gameObject.SetActive(true);
            }
        }
コード例 #16
0
        /// <summary>
        /// Calculates the amount to which neuroticism affects a specified emotion
        /// </summary>
        /// <param name="et">The emotion to be evaluated</param>
        /// <param name="value">The intensity of the emotion</param>
        /// <returns>The amount to which neuroticism affects a specified emotion</returns>
        private double IntroversionFactor(EmotionType et, double value)
        {
            double trueIntroversion = Introversion - NEUTRAL_PERSONALITY_INTENSITY;

            // Introverts tend to feel emotions more intensly, while extroverts feel emotions
            // less intensly but overall this effect is smaller than the other personalities (Doce et al.)
            return(value * trueIntroversion * 0.1); // The 0.1 has been chosen to ensure that the effect is small
        }
コード例 #17
0
        public void SubmitImageForPhoto2(EmotionType emotion)
        {
            var playerEmotionModel = new PlayerEmotionModel(Player2Name, emotion);
            var serializedInput    = JsonConvert.SerializeObject(playerEmotionModel);

            App.InvokeBackdoorMethod(BackdoorMethodConstants.SubmitImageForPhoto2, serializedInput);
            App.WaitForElement(_photoImage2);
        }
コード例 #18
0
        public static Answer FromJSON(JSONWrappers.Answer jsonAnswer)
        {
            Question    question    = Question.FromJSON(jsonAnswer.Question);
            EmotionType userInput   = Utils.EmotionTypeStringToEnum(jsonAnswer.UserInput);
            float       elapsedTime = Convert.ToSingle(jsonAnswer.ElapsedTime, new CultureInfo("en-US"));

            return(new Answer(question, userInput, elapsedTime));
        }
コード例 #19
0
        }                                  // Time taken by the user to answer in milliseconds. -1 means "No answer"
        protected Answer(Question question, EmotionType userInput, float elapsedTime)
        {
            Debug.Assert((elapsedTime >= -1.0f) && (elapsedTime <= 10000.0f), "Time value must be in range -1-10000");

            Question    = question;
            UserInput   = userInput;
            ElapsedTime = elapsedTime;
        }
コード例 #20
0
 public void SetToppingEmotion()
 {   //for loop that randomly gives all active toppings a random emotion
     for (int i = 0; i < toppings.Count; i++)
     {
         EmotionType randomEmotion = (EmotionType)Random.Range(1, 10);
         toppings[i].GetComponent <Topping>().SetEmotion(randomEmotion);
         toppings[i].GetComponent <Topping>().SetEmotionWordSprite(GetComponent <EmotionHolder>().GetEmotionIcon(randomEmotion));
     }
 }
コード例 #21
0
ファイル: TaskA.cs プロジェクト: war-man/70-483
            public void Handle(EmotionType emotion)
            {
                if (emotion != EmotionType.Anger)
                {
                    return;
                }

                Console.WriteLine("Yep, I can handle your anger. Keep calm mate!");
            }
コード例 #22
0
 // copy constructor
 public NoteSpec(NoteSpec n)
 {
     this.timing      = n.timing;
     this.pitch       = n.pitch;
     this.emotionType = n.emotionType;
     this.elevation   = n.elevation;
     this.instrument  = n.instrument;
     this.lyric       = n.lyric;
 }
コード例 #23
0
 public NoteSpawnSpec(float spawnTime, EmotionType type, AudioClip clip, int elevation, float volume = 1, string lyric = "")
 {
     this.spawnTime   = spawnTime;
     this.emotionType = type;
     this.clip        = clip;
     this.elevation   = elevation;
     this.volume      = volume;
     this.lyric       = lyric;
 }
コード例 #24
0
 public EmotionPacketRequest(byte[] data)
 {
     using (var reader = new BinaryReader(new MemoryStream(data)))
     {
         Cmd   = (PacketCmd)reader.ReadByte();
         NetId = reader.ReadUInt32();
         Id    = (EmotionType)reader.ReadByte();
     }
 }
コード例 #25
0
        /// <summary>
        /// Add to the intensity of a specific emotion in the tree
        /// </summary>
        /// <param name="et">The emotion type to add to</param>
        /// <param name="value">The intensity to add</param>
        public void addToEmotion(EmotionType et, double value)
        {
            EmotionNode node = getNode(et);

            if (node != null)
            {
                node.addToEmotion(et, value);
            }
        }
コード例 #26
0
        public static Task SubmitImageForPhoto2(string playerName, EmotionType emotion)
        {
            var player2 = new PlayerModel(PlayerNumberType.Player2, playerName)
            {
                ImageMediaFile = new MediaFile($"{Xamarin.Essentials.FileSystem.AppDataDirectory}/player2photo", () => _applicationTypeInfo.GetTypeInfo().Assembly.GetManifestResourceStream($"{_applicationTypeInfo.Namespace}.Images.{emotion}.png"))
            };

            return(FaceOffViewModel.SubmitPhoto(emotion, player2));
        }
コード例 #27
0
 public KeyboardTimbre PressKey(EmotionType emotion)
 {
     return(new KeyboardTimbre
     {
         Dynamic = true,
         EmotionType = emotion,
         Loud = false
     });
 }
コード例 #28
0
ファイル: CharacterViewer.cs プロジェクト: TFM-AEIS/TFM
        /// <summary>
        /// Change character facial expression/emote then reset to default face after a period of time.
        /// </summary>
        /// <param name="emotionType">target emotion.</param>
        /// <param name="duration">the duration of the emotion before resetting back to default.</param>
        public void Emote(EmotionType emotionType, float duration)
        {
            EmoteIndex i = emotes.getIndex(emotionType);

            if (isEmotingAnimationEvent)
            {
                updateAnimEmote(-1);
            }
            emote(i, duration, false);
        }
コード例 #29
0
        public void Play(IList <float> notes)
        {
            Random random = new Random();

            foreach (var note in notes)
            {
                EmotionType emotion = (EmotionType)random.Next(0, 3);
                Console.WriteLine($"Playing {FrequencyMapper.Instance.GetNoteFromHz(note)} with timbre {PressKey(emotion).Emit()}");
            }
        }
コード例 #30
0
 public VoiceTimbre EmitNormally(EmotionType emotion)
 {
     return(new VoiceTimbre
     {
         EmotionType = emotion,
         Loud = false,
         Harsh = false,
         Punchy = false
     });
 }
コード例 #31
0
 public VoiceTimbre EmitScream(EmotionType emotion)
 {
     return(new VoiceTimbre
     {
         EmotionType = emotion,
         Loud = true,
         Harsh = false,
         Punchy = true
     });
 }
コード例 #32
0
    /// <summary>
    /// 播放情緒動作(Coroutine)
    /// </summary>
    /// <param name="LavaType">毛毛蟲類型</param>
    /// <param name="eType">情緒類型</param>
    /// <returns></returns>
    IEnumerator PlayEmotion(PlayerType LavaType, EmotionType eType)
    {
        switch (eType)
        {
            case EmotionType.Sad:
                headSprite.spriteName = "Png_Ingame_Caterpillar0" + ((int)LavaType).ToString() + "_face02";
                break;
            case EmotionType.Tired:
                headSprite.spriteName = "Png_Ingame_Caterpillar0" + ((int)LavaType).ToString() + "_face05";
                break;
            case EmotionType.Singing:
                headSprite.spriteName = "Png_Ingame_Caterpillar0" + ((int)LavaType).ToString() + "_face06";
                break;
        }

        yield return new WaitForSeconds(0.8f);

        state.ChangeSprite(variable.LavaType, state.CurrentState);
    }
コード例 #33
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public NPC(string id)
 {
     this.id = id;
     this.name = I18nManager.Instance.Get("NPC."+id);
     this.emotion = EmotionType.NEUTRAL;
 }
コード例 #34
0
ファイル: AMicroblog.Async.m.cs プロジェクト: dkme/moooyo
        /// <summary>
        /// The async implementation of <see cref="GetEmotions"/>
        /// </summary>
        public static void GetEmotionsAsync(AsyncCallback<Emotions> callback, EmotionType emotionType = EmotionType.Image, string language = "")
        {
            var requester = new OAuthHttpGet(APIUri.GetEmotions);
            if (emotionType != EmotionType.Image)
            {
                var eType = string.Empty;
                switch (emotionType)
                {
                    case EmotionType.Image:
                        eType = "face";
                        break;
                    case EmotionType.Magic:
                        eType = "ani";
                        break;
                    case EmotionType.Cartoon:
                        eType = "cartoon";
                        break;
                    default:
                        eType = "face";
                        break;
                }
                requester.Params.Add(new ParamPair("type", eType));
            }

            if (!string.IsNullOrEmpty(language))
                requester.Params.Add(new ParamPair("language", language));

            requester.RequestAsync(delegate(AsyncCallResult<string> result)
            {
                ProcessAsyncCallbackResponse(result, callback, EncodeXmlCharsPreprocess);
            });
        }
コード例 #35
0
        /// <summary>
        /// Ctor
        /// </summary>
        public UIDialog(string id, 
		                DialogType type, 
		                string storyId, 
		                string characterImage, 
		                string characterName, 
		                bool characterVisible, 
		                Dictionary<string, string> texts,
						Vector3 position,
						Vector3 npcPosition)
        {
            this.id = id;
            this.type = type;
            this.storyId = storyId;
            this.characterImage = characterImage;
            this.characterName = characterName;
            this.characterVisible = characterVisible;
            this.texts = texts;
            this.emotion = EmotionType.NEUTRAL; //"neutral";
            this.position = position;
            this.npcPosition = npcPosition;
        }
コード例 #36
0
ファイル: StatusAPI.cs プロジェクト: vebin/WeiboSdk
		/// <summary>
		/// 
		/// </summary>
		/// <param name="type">表情类别,face:普通表情、ani:魔法表情、cartoon:动漫表情,默认为face。 </param>
		/// <param name="language">语言类别,cnname:简体、twname:繁体,默认为cnname。 </param>
		/// <returns></returns>
		public string Emotions(EmotionType type, LanguageType language)
		{
			return (Client.GetCommand("emotions",
						new WeiboParameter("type", type),
						new WeiboParameter("language", language)));
		}
コード例 #37
0
        /// <summary>
        /// Get string name of the emotion type
        /// </summary>
        public static string GetEmotionName(EmotionType type)
        {
            if(type == EmotionType.NEUTRAL)
                    return "neutral";
            if(type == EmotionType.POSITIVE)
                    return "positive";
            if(type == EmotionType.NEGATIVE)
                    return "negative";

            throw new System.ArgumentException("Invalid EmotionType: "+type);
        }
コード例 #38
0
        /// <summary>
        /// Get localized text by paramter.
        /// </summary>
        //public string GetText(string emo)
        public string GetText(EmotionType emo)
        {
            if(!texts.ContainsKey(GetEmotionName(emo)))
            {
                throw new Exception("Missing text for emotion:"+GetEmotionName(emo)+" in UIDialog:"+id);
            }

            string txt = I18nManager.Instance.Get(storyId+"."+texts[GetEmotionName(emo)]);
            //auto strip for buttons
            if(type == DialogType.MULTICHOICE)
            {
                //remove new line
                txt = txt.Replace('\n', ' ');
            }

            return txt;
        }
コード例 #39
0
        /// <summary>
        /// Process multi choice answer and set npc emotions
        /// </summary>
        private void ProcessSelection(string param)
        {
            UICharacter player = (UICharacter)ui.ActiveScreen.GetObject("Player");
            //player.Emotion = EmotionType.NEUTRAL;

            if(param == "btn_MultipleChoice_Answer_Positive")
            {
                emotion = EmotionType.POSITIVE;
                //if(uiCharacter != null)
                    player.Emotion = EmotionType.POSITIVE;

                if(playerDialog != null)
                    playerDialog.Emotion = EmotionType.POSITIVE;

                // Log.GameTimes ("ProcessSelection : " +
                //               playerdialog.Id + " " +
                //               EmotionType.POSITIVE);
                GameManager.Instance.Event("DIALOG", playerDialog.Id, "answered");
                if(processAnswer != null)
                    processAnswer(playerDialog, EmotionType.POSITIVE);
            }
            else if(param == "btn_MultipleChoice_Answer_Negative")
            {
                emotion = EmotionType.NEGATIVE;
                if(uiCharacter != null)
                {
                    player.Emotion = EmotionType.NEGATIVE;
                    playerDialog.Emotion = EmotionType.NEGATIVE;
                }
                // Log.GameTimes ("ProcessSelection : " +
                 //              playerdialog.Id + " " +
                 //              EmotionType.NEGATIVE);
                GameManager.Instance.Event("DIALOG", playerDialog.Id, "answered");
                if(processAnswer != null)
                    processAnswer(playerDialog, EmotionType.NEGATIVE);
            }
            else if(param == "btn_MultipleChoice_Answer_Neutral")
            {
                emotion = EmotionType.NEUTRAL;
                if(uiCharacter != null)
                {
                    player.Emotion = EmotionType.NEUTRAL;
                    playerDialog.Emotion = EmotionType.NEUTRAL;
                }
                // Log.GameTimes ("ProcessSelection : " +
                //               playerdialog.Id + " " +
                //               EmotionType.NEUTRAL);
                GameManager.Instance.Event("DIALOG", playerDialog.Id, "answered");
                if(processAnswer != null)
                    processAnswer(playerDialog, EmotionType.NEUTRAL);
            }
            else
            {
                // Log.Error("Invalid param '"+param+"' in "+gameObject.name);
            }

            if(player != null && uiCharacter != null)
            {
                //player.Emotion = uiCharacter.Emotion;
            }
        }
コード例 #40
0
ファイル: StatusImpl.cs プロジェクト: westonfw/opensdk
 /// <summary>
 /// 
 /// </summary>
 /// <param name="type">表情类别,face:普通表情、ani:魔法表情、cartoon:动漫表情,默认为face。 </param>
 /// <param name="language">语言类别,cnname:简体、twname:繁体,默认为cnname。 </param>
 /// <returns></returns>
 public string Emotions(EmotionType type, LanguageType language)
 {
     return (Client.DoGetCommand("emotions",
                 new RequestParam("type", type),
                 new RequestParam("language", language)));
 }
コード例 #41
0
 public ShowPinMessage(NavMeshAgent agentMesh, EmotionType type)
 {
     AgentMesh = agentMesh;
     Type = type;
 }
コード例 #42
0
 /// <summary>
 /// Function to process the answer for multichoice dialogs
 /// </summary>
 public void ProcessMultiChoiceAnswer(UIDialog dialog, EmotionType answer)
 {
     Log.Info("Dialog "+dialog.Id+" answer:"+answer);
 }
コード例 #43
0
 public void ChangeEmotion(EmotionType faceNumber)
 {
     NPC.GetComponent<Image>().sprite = Emotion[(int)faceNumber];
 }
コード例 #44
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="type">表情类别,face:普通表情、ani:魔法表情、cartoon:动漫表情,默认为face。 </param>
 /// <param name="language">语言类别,cnname:简体、twname:繁体,默认为cnname。 </param>
 /// <returns></returns>
 public IEnumerable<Entities.status.Emotion> Emotions(EmotionType type= EmotionType.face, LanguageType language= LanguageType.cnname)
 {
     return JsonConvert.DeserializeObject<IEnumerable<Entities.status.Emotion>>(api.Emotions(type, language));
 }
コード例 #45
0
        /// <summary>
        /// Process multi choice answer.
        /// TODO this is just an example for now, we can later improve this
        /// score Logic
        /// </summary>
        public void ProcessDialogAnswer(UIDialog dialog, EmotionType answer)
        {
            if(dialog.Id == "D002")
            {
                //ProcessQuestion1(answer);
            }
            else if(dialog.Id == "D006")
            {

                // ProcessQuestion2(answer);
            }
        }
コード例 #46
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="type">表情类别,face:普通表情、ani:魔法表情、cartoon:动漫表情,默认为face。 </param>
		/// <param name="language">语言类别,cnname:简体、twname:繁体,默认为cnname。 </param>
		/// <returns></returns>
		public dynamic Emotions(EmotionType type, LanguageType language)
		{
			return DynamicJson.Parse(api.Emotions(type,language));
		}
コード例 #47
0
 /// <summary>
 /// This function handle the dialogView answer from player.
 /// Need to override it in the screen script. 
 /// </summary>
 public virtual void ProcessAnswer(UIDialog dialog, EmotionType answer)
 {
     Log.Warning("Please OVERRIDE ME!! in:"+gameObject.name);
 }