예제 #1
0
        /// <summary>
        /// 根据参数配置创建类的实例
        /// </summary>
        /// <param name="createArgs">参数配置</param>
        /// <returns>返回类实例</returns>
        public static MapEvent Create(XElement createArgs, Coord existCoord)
        {
            string fileName    = createArgs.Attribute("imagefile").Value;
            string name        = createArgs.Attribute("eventName").Value;
            string description = createArgs.Attribute("description").Value;

            return(new Equip(fileName, existCoord, name, description, AbilityArgs.CreateFrom(createArgs)));
        }
예제 #2
0
        /// <summary>
        /// 根据参数配置创建类的实例
        /// </summary>
        /// <param name="createArgs">参数配置</param>
        /// <returns>返回类实例</returns>
        public new static MapEvent Create(XElement createArgs, Coord existCoord)
        {
            string fileName    = createArgs.Attribute("imagefile").Value;
            string name        = createArgs.Attribute("eventName").Value;
            string description = createArgs.Attribute("description").Value;

            string[] skillImages = GetSkillImages(createArgs);

            return(new Weapon(fileName, existCoord, name, description, AbilityArgs.CreateFrom(createArgs), skillImages));
        }