Beispiel #1
0
 public void UITextSceneExpression(Dictionary <int, CharacterExpressionCpt.CharacterExpressionEnum> mapData)
 {
     foreach (var item in mapData)
     {
         int npcNum = item.Key;
         CharacterExpressionCpt.CharacterExpressionEnum expression = item.Value;
         GameObject    objNpc = StoryInfoHandler.Instance.builderForStory.GetNpcByNpcNum(npcNum);
         NpcAIStoryCpt npcAI  = objNpc.GetComponent <NpcAIStoryCpt>();
         npcAI.SetExpression(expression);
     }
 }
Beispiel #2
0
    public void HandleForNpcExpression(StoryInfoDetailsBean itemData)
    {
        //表情
        GameObject objItem = GetNpcByNpcNum(itemData.num);

        if (objItem != null)
        {
            NpcAIStoryCpt npcAIStory = objItem.GetComponent <NpcAIStoryCpt>();
            if (npcAIStory != null)
            {
                npcAIStory.SetExpression(itemData.expression);
            }
        }
    }