コード例 #1
0
        protected override void AddBaseAttackEffects(AbstractPerson self)
        {
            TestPerson tp = self as TestPerson;

            Assert.IsTrue(tp != null);
            tp.attackEffects.Add(new InstantDamageEffect(this.Attack, this.Dir));
            tp.attackEffects.Add(new HitbackEffect(new Vector2(this.hitback, 0)));
        }
コード例 #2
0
        protected override void AddBaseAttackEffects(AbstractPerson self)
        {
            var player = self as Player;

            Assert.IsTrue(player != null);
            player.attackEffects.Add(new InstantDamageEffect(GameMath.Damage(player.Attack, player.attackMultipulier, player.attackAdder), player.Dir));
            player.attackEffects.Add(new HitbackEffect(new Vector2(player.Dir * player.hitBackSpeed, 0)));
        }
コード例 #3
0
 /// <summary>
 /// 添加基础攻击效果
 /// </summary>
 /// <param name="ap"></param>
 protected abstract void AddBaseAttackEffects(AbstractPerson self);