Esempio n. 1
0
 /// <summary>Called when we collide with another object beyond some impact speed.</summary>
 /// <description>
 /// The Player class makes use of this callback when a collision speed is more than PlayerData::minImpactSpeed.
 /// </description>
 /// <param name="obj">The ShapeBase object</param>
 /// <param name="collObj">The object we collided with</param>
 /// <param name="vec">Collision impact vector</param>
 /// <param name="len">Length of the impact vector</param>
 public virtual void OnImpact(ShapeBase obj, SceneObject collObj, Point3F vec, float len)
 {
     vec.Alloc();             InternalUnsafeMethods.OnImpact__Args _args = new InternalUnsafeMethods.OnImpact__Args()
     {
         obj     = obj.ObjectPtr,
         collObj = collObj.ObjectPtr,
         vec     = vec.internalStructPtr,
         len     = len,
     };
     InternalUnsafeMethods.OnImpact()(ObjectPtr, _args);
     vec.Free();
 }
Esempio n. 2
0
 /// <description>
 /// Called at the spell's missile impact marking the end of the deliver stage and the start of the linger stage.
 /// </description>
 /// <param name="spell">the spell object</param>
 public virtual void OnImpact(afxMagicSpell spell, ShapeBase caster, SceneObject impacted, Point3F pos, Point3F normal)
 {
     pos.Alloc(); normal.Alloc();             InternalUnsafeMethods.OnImpact__Args _args = new InternalUnsafeMethods.OnImpact__Args()
     {
         spell    = spell.ObjectPtr,
         caster   = caster.ObjectPtr,
         impacted = impacted.ObjectPtr,
         pos      = pos.internalStructPtr,
         normal   = normal.internalStructPtr,
     };
     InternalUnsafeMethods.OnImpact()(ObjectPtr, _args);
     pos.Free(); normal.Free();
 }