Example #1
0
 public Bullet(float HealthChange, float TravelSpeed, IImpactEffect Effect, Texture2D Texture)
 {
     this.HealthChange = HealthChange;
     this.Effect       = Effect;
     this.Texture      = Texture;
     this.TravelSpeed  = TravelSpeed;
 }
Example #2
0
 public Bullet(float HealthChange, float TravelSpeed, IImpactEffect Effect, Texture2D Texture)
 {
     this.HealthChange = HealthChange;
     this.Effect = Effect;
     this.Texture = Texture;
     this.TravelSpeed = TravelSpeed;
 }
Example #3
0
    public static IImpactEffect[] CreateImpactEffects(SkillData data)
    {
        IImpactEffect[] impacts = new IImpactEffect[data.impactType.Length];

        for (int i = 0; i < data.impactType.Length; i++)
        {
            string classNameImpact = string.Format("{0}Impact", data.impactType[i]);
            impacts[i] = CreateObject <IImpactEffect>(classNameImpact);
        }
        return(impacts);
    }
Example #4
0
 public static IImpactEffect[] CreateImpactEffects(SkillData data)
 {
     // 选取对象
     //currentSkillData.impactType  ---> IImpactEffect[]
     IImpactEffect[] effectArr = new IImpactEffect[data.impactType.Length];
     for (int i = 0; i < effectArr.Length; i++)
     {
         //Type type = Type.GetType("ARPGDemo.Skill." + data.impactType[i] + "ImpactEffect");
         effectArr[i] = CreateObject <IImpactEffect>("ARPGDemo.Skill." + data.impactType[i] + "ImpactEffect");
     }
     return(effectArr);
 }
        public static IImpactEffect[] CreateImpactEffects(SkillData data)
        {
            IImpactEffect[] impacts = new IImpactEffect[data.skillImpactTypes.Length];

            for (int i = 0; i < impacts.Length; i++)
            {
                string className = string.Format("VFramework.Skill.{0}Impact", data.skillImpactTypes[i]);
                impacts[i] = CreateObject <IImpactEffect>(className);
            }

            return(impacts);
        }
Example #6
0
 public static IImpactEffect[] CreateImpactEffects(SkillData data)
 {
     IImpactEffect[] impacts = new IImpactEffect[data.impactType.Length];
     //命名规范:impactTpye[?] + Impact
     //例如消耗法力:CostSPImpact
     for (int i = 0; i < data.impactType.Length; ++i)
     {
         string classNameImpact = string.Format("{0}Impact", data.impactType[i]);
         impacts[i] = CreatObject <IImpactEffect>(classNameImpact);
     }
     return(impacts);
 }
 /// <summary>
 /// 创建影响效果对象
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 public static IImpactEffect[] CreateImpactEffects(SkillData data)
 {
     ImpactType[]    impactTypes = data.impactType;
     IImpactEffect[] impacts     = new IImpactEffect[impactTypes.Length];
     for (int i = 0; i < impactTypes.Length; i++)
     {
         ImpactType impactType      = impactTypes[i];
         string     classNameImpact = $"SkillSystem.{impactType}ImpactEffect";
         impacts[i] = CreateObject <IImpactEffect> (classNameImpact);
     }
     return(impacts);
 }
 public static IImpactEffect[] CreateImpactEffect(SkillData skillData)
 {
     //效果命名规范:EveryFunc.Skill. + 枚举名 + Impact
     //例子: EveryFunc.Skill.StrikeImpact
     IImpactEffect[] impactArrays = new IImpactEffect[skillData.impactType.Length];
     for (int i = 0; i < skillData.impactType.Length; i++)
     {
         string classNameImpact = string.Format("EveryFunc.Skill.{0}Impact", skillData.impactType[i]);
         impactArrays[i] = CreateObject <IImpactEffect> (classNameImpact);
     }
     return(impactArrays);
 }
Example #9
0
        public static IImpactEffect[] CreateImpactEffects(SkillData skillData)
        {
            IImpactEffect[] impactArray = new IImpactEffect[skillData.impactType.Length];

            //影响(数组类型)
            //影响效果命名规则
            //ARPG.Skill.+impactTypy[?]+Impact
            for (int i = 0; i < skillData.impactType.Length; i++)
            {
                string classNameImapct = string.Format("ARPG.Skill.{0}ImpactEffect", skillData.impactType[i]);
                impactArray[i] = CreateObject <IImpactEffect>(classNameImapct);
            }
            return(impactArray);
        }
Example #10
0
 public Enemy Clone(Enemy enemy)
 {
     Name            = enemy.Name;
     Bounty          = enemy.Bounty;
     Damage          = enemy.Damage;
     MaxHealthPoints = enemy.MaxHealthPoints;
     HealthPoints    = enemy.HealthPoints;
     Bounty          = enemy.Bounty;
     ImpactEffect    = enemy.ImpactEffect;
     Texture         = enemy.Texture;
     Speed           = enemy.Speed;
     IsDiffBoosted   = false;
     Dead            = false;
     Disabled        = false;
     EnemyID         = enemy.EnemyID;
     Scale           = enemy.Scale;
     return(this);
 }