private bool Player_body_OnCollision(Fixture sender, Fixture other, tainicom.Aether.Physics2D.Dynamics.Contacts.Contact contact) { if (other.CollisionGroup == sender.CollisionGroup) { DoHorizantalBounce(sender, other); } if (other.CollisionGroup == 0 && body.Position.Y < other.Body.Position.Y) { isGrounded = true; DoJump(0, -jumpSpeed * .5f); } if (other.CollisionGroup == 6) { DoHorizantalBounce(sender, other); } if (other.CollisionGroup == GetOpposedCollisionGroup(true)) { //DoHorizantalBounce(sender, other); } return(true); }
private bool Body_OnCollision(Fixture sender, Fixture other, tainicom.Aether.Physics2D.Dynamics.Contacts.Contact contact) { if (other.CollisionGroup == thisActor.GetOpposedCollisionGroup(false)) { thisActor.TakeDamage(); } return(true); }
private bool Body_OnCollision(Fixture sender, Fixture other, tainicom.Aether.Physics2D.Dynamics.Contacts.Contact contact) { if (other.CollisionGroup == 0) { isBeingDestroyed = true; } return(true); }
private void Body_OnSeparation(Fixture sender, Fixture other, tainicom.Aether.Physics2D.Dynamics.Contacts.Contact contact) { if (other.CollisionGroup == 0) { isGrounded = false; if (currState == AnimStates.Walking) { currState = AnimStates.Still; } } }
private bool Body_OnCollision(Fixture sender, Fixture other, tainicom.Aether.Physics2D.Dynamics.Contacts.Contact contact) { if (other.CollisionGroup == thisActor.GetOpposedCollisionGroup(true)) { thisActor.DoJump(100000, 100000); } if (other.CollisionGroup == thisActor.GetCollisionGroup(true)) { thisActor.DoJump(100000, 100000); } return(true); }
private bool Body_OnCollision(Fixture sender, Fixture other, tainicom.Aether.Physics2D.Dynamics.Contacts.Contact contact) { if (sender.CollisionGroup != other.CollisionGroup) { Vector2 pushForce = other.Body.Position - sender.Body.Position; pushForce.Normalize(); pushForce = pushForce * 100000; } if (other.CollisionGroup == 5) { SFX.NonHurt.Play(); } return(true); }