/// <summary>Called when the object is damaged.</summary> /// <description> /// /// </description> /// <param name="obj">The ShapeBase object</param> /// <param name="obj">The ShapeBase object</param> /// <param name="delta">The amount of damage received.</param> public virtual void OnDamage(ShapeBase obj, float delta) { InternalUnsafeMethods.OnDamage__Args _args = new InternalUnsafeMethods.OnDamage__Args() { obj = obj.ObjectPtr, delta = delta, }; InternalUnsafeMethods.OnDamage()(ObjectPtr, _args); }
/// <description> /// Called when the spell deals damage. /// </description> /// <param name="spell">the spell object</param> public virtual void OnDamage(afxMagicSpell spell, string label, string flaver, uint target_id, float amount, byte n, Point3F pos, float ad_amount, float radius, float impulse) { pos.Alloc(); InternalUnsafeMethods.OnDamage__Args _args = new InternalUnsafeMethods.OnDamage__Args() { spell = spell.ObjectPtr, label = label, flaver = flaver, target_id = target_id, amount = amount, n = n, pos = pos.internalStructPtr, ad_amount = ad_amount, radius = radius, impulse = impulse, }; InternalUnsafeMethods.OnDamage()(ObjectPtr, _args); pos.Free(); }