public override void EmitAffect(EmitAffectArgs args) { if (typeof(IPhysicalAttackingEventHandler).IsAssignableFrom(args.affect.GetType()) || typeof(IMagicalAttackingEventHandler).IsAssignableFrom(args.affect.GetType())) { Destroy(gameObject, 2f); } }
public static void EmitAffects(Race own, EmitAffectArgs args) { var a = new Action <Race> (r => { var affectModule = r.GetModule <AffectModule> (); foreach (var affect in affectModule.affects) { affect.EmitAffect(args); } }); a.Invoke(own); a.Invoke(args.target); }
public override void EmitAffect(EmitAffectArgs args) { ableBurnAffect = typeof(IMagicalAttackingEventHandler).IsAssignableFrom(args.affect.GetType()); }
public virtual void EmitAffect(EmitAffectArgs args) { }