コード例 #1
0
    public bool GetMovieDialogObject(int taskID, out MovieDialogObj taskObject)
    {
        taskObject = null;

        if (!_mMovieDialogObjectDic.TryGetValue(taskID, out taskObject))
        {
            return(false);
        }
        return(true);
    }
コード例 #2
0
    private bool LoadItemElement(SecurityElement element, out MovieDialogObj itemElement)
    {
        itemElement = new MovieDialogObj();
        string attribute = element.Attribute("TalkID");

        if (attribute != null)
        {
            itemElement.TalkID = StrParser.ParseDecInt(attribute, 0);
        }
        attribute = element.Attribute("Num");
        if (attribute != null)
        {
            itemElement.Num = StrParser.ParseDecInt(attribute, 0);
        }
        attribute = element.Attribute("Type");
        if (attribute != null)
        {
            itemElement.Type = StrParser.ParseDecInt(attribute, 0);
        }
        attribute = element.Attribute("Picture");
        if (attribute != null)
        {
            itemElement.Picture = StrParser.ParseStr(attribute, "");
        }
        attribute = element.Attribute("Model_SceneID");
        if (attribute != null)
        {
            itemElement.Model_SceneID = StrParser.ParseDecInt(attribute, 0);
        }

        attribute = element.Attribute("Character_ID1");
        if (attribute != null)
        {
            itemElement.Character_ID1 = StrParser.ParseDecInt(attribute, 0);
        }
        attribute = element.Attribute("Act1");
        if (attribute != null)
        {
            itemElement.Act1 = StrParser.ParseStr(attribute, "");
        }
        attribute = element.Attribute("Character_ID2");
        if (attribute != null)
        {
            itemElement.Character_ID2 = StrParser.ParseDecInt(attribute, 0);
        }

        attribute = element.Attribute("Act2");
        if (attribute != null)
        {
            itemElement.Act2 = StrParser.ParseStr(attribute, "");
        }
        attribute = element.Attribute("CGID");
        if (attribute != null)
        {
            itemElement.CGID = StrParser.ParseDecInt(attribute, 0);
        }
        attribute = element.Attribute("Name");
        if (attribute != null)
        {
            itemElement.Name = StrParser.ParseStr(attribute, "");
        }

        attribute = element.Attribute("Dialog");
        if (attribute != null)
        {
            itemElement.Dialog = StrParser.ParseStr(attribute, "");
        }


        attribute = element.Attribute("Sound");
        if (attribute != null)
        {
            itemElement.Sound = StrParser.ParseStr(attribute, "");
        }
        attribute = element.Attribute("SoundInfo");
        if (attribute != null)
        {
            itemElement.SoundInfo = StrParser.ParseStr(attribute, "");
        }
        attribute = element.Attribute("EffectIDHead");
        if (attribute != null)
        {
            itemElement.EffectIDHead = StrParser.ParseStr(attribute, "");
        }

        attribute = element.Attribute("EffectIDTail");
        if (attribute != null)
        {
            itemElement.EffectIDTail = StrParser.ParseStr(attribute, "");
        }


        return(true);
    }