Ejemplo n.º 1
0
        protected override void SaveTypeTo(XElement eventType)
        {
            eventType.SetAttributeValue("imagefile", MotaImage.GetFileName(this.FaceIndex));

            eventType.SetAttributeValue("key", Property.GetName(this.Key));
            eventType.SetAttributeValue("exist", this.Exist.ToString());
        }
Ejemplo n.º 2
0
        protected override void SaveTypeTo(XElement eventType)
        {
            eventType.SetAttributeValue("imagefile", MotaImage.GetFileName(this.FaceIndex));

            eventType.SetAttributeValue("touchMethod", this.TriggerMethod == TouchMethod.StationTouch ? "station" : "");
            eventType.SetAttributeValue("repeated", this.Repeated.ToString());
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 设计技能特效
 /// </summary>
 protected virtual void SetFace(IFighter attacker, IFighter defencer)
 {
     if (this.CurFace != null)
     {
         defencer.SkillOnIt = this.CurFace;
     }
     else
     {
         if (MotaImage.GetImage(FaceIndex) != null)
         {
             defencer.SkillOnIt = null;
         }
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 设计技能特效
 /// </summary>
 protected override void SetFace(IFighter attacker, IFighter defencer)
 {
     if (this.CurFace != null)
     {
         attacker.SkillOnIt = this.CurFace;
         defencer.SkillOnIt = null;
     }
     else
     {
         if (MotaImage.GetImage(FaceIndex) != null)
         {
             attacker.SkillOnIt = null;
             return;
         }
     }
 }
Ejemplo n.º 5
0
        protected override void SaveTypeTo(XElement eventType)
        {
            eventType.SetAttributeValue("imagefile", MotaImage.GetFileName(this.FaceIndex));
            eventType.SetAttributeValue("description", this.ShopMessage);

            //添加交易项数据
            XElement deals = new XElement("deals");

            foreach (var item in this.DealOptions)
            {
                XElement deal = new XElement("deal");
                item.SaveTo(deal);
                deals.Add(deal);
            }

            eventType.Add(deals);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 重新设置技能动画
 /// </summary>
 /// <param name="fileName">技能动画图像文件</param>
 public void ResetFlash(string fileName)
 {
     base.FaceIndex = MotaImage.GetFaceIndex(fileName, GameIni.SkillFrameSize);
 }
Ejemplo n.º 7
0
 protected override void SaveTypeTo(XElement eventType)
 {
     eventType.SetAttributeValue("imagefile", MotaImage.GetFileName(this.FaceIndex));
     eventType.SetAttributeValue("description", this.Description);
     this.GetAbility.SaveTo(eventType);
 }
Ejemplo n.º 8
0
        /// <summary>
        /// 创建动态元素实例
        /// </summary>
        /// <param name="repeated">元素图像是否重复播放</param>
        /// <param name="interval">每帧的部分间隔</param>
        /// <param name="fileName">图像文件地址</param>
        /// <param name="unitSize">图像分隔的单位尺寸</param>
        public DynamicElement(bool repeated, int interval, string fileName, Size unitSize)
        {
            FaceIndex = MotaImage.GetFaceIndex(fileName, unitSize);

            Initialize(repeated, interval);
        }