Esempio n. 1
0
 /// <summary>
 /// Post-spawn handling.
 /// </summary>
 /// <param name="e">The event.</param>
 public void SpawnHandle(FreneticEventArgs <EntitySpawnEventArgs> e)
 {
     Character = PhysEnt.OriginalObject as CharacterController;
     if (double.IsNaN(StandardGroundForce))
     {
         StandardGroundForce = Character.TractionForce;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Post-spawn handling.
 /// </summary>
 /// <param name="e">The event.</param>
 public void SpawnHandle(FreneticEventArgs <EntitySpawnEventArgs> e)
 {
     if (ForcePosition)
     {
         POPJ = new PointOnPlaneJoint(null, PhysEnt.SpawnedBody, Vector3.Zero, Vector3.UnitZ, Vector3.Zero);
         PhysEnt.PhysicsWorld.Internal.Add(POPJ);
     }
     RAJ = new RevoluteAngularJoint(null, PhysEnt.SpawnedBody, Vector3.UnitZ);
     PhysEnt.PhysicsWorld.Internal.Add(RAJ);
 }
Esempio n. 3
0
 /// <summary>
 /// Fired on the secondary spawn event.
 /// </summary>
 /// <param name="e">Event data.</param>
 public void OnSpawnSecond(FreneticEventArgs <EntitySpawnEventArgs> e)
 {
     PhysChar = Entity.GetProperty <ClientEntityPhysicsProperty>().OriginalObject as CharacterController;
 }