private void ExternalTouch_EndCollision(object sender, CollisionInfo3D info) { var otherEntity = this.UnregisterCollidedEntity(info); this.externalTouchCollisionEntities.Remove(otherEntity); this.RemoveFocusableInteraction(otherEntity); }
private void Cursor_UpdateCollision(object sender, CollisionInfo3D info) { var cursorEntity = info.ThisBody.Owner; var interactedEntity = info.OtherBody.Owner; this.RunTouchHandlers(cursorEntity, interactedEntity, (h, e) => h?.OnTouchUpdated(e)); }
private void InternalTouch_UpdateCollision(object sender, CollisionInfo3D info) { if (this.collisionEntitiesByCollisionId.TryGetValue(info.Id, out var interactedEntity) && this.nearTouchCollisionEntities.Contains(interactedEntity)) { this.RunTouchHandlers(interactedEntity, (h, e) => h?.OnTouchUpdated(e)); } }
private Entity RegisterCollidedEntity(CollisionInfo3D info) { this.UnregisterCollidedEntity(info); var otherEntity = info.OtherBody.Owner; this.collisionEntitiesByCollisionId.Add(info.Id, otherEntity); return(otherEntity); }
private void Cursor_EndCollision(object sender, CollisionInfo3D info) { var cursorEntity = info.ThisBody.Owner; var interactedEntity = info.OtherBody.Owner; this.RunTouchHandlers(cursorEntity, interactedEntity, (h, e) => h?.OnTouchCompleted(e)); this.cursorCollisions.Remove(cursorEntity); }
private Entity UnregisterCollidedEntity(CollisionInfo3D info) { if (this.collisionEntitiesByCollisionId.TryGetValue(info.Id, out var otherEntity)) { this.collisionEntitiesByCollisionId.Remove(info.Id); return(otherEntity); } return(null); }
private void InternalTouch_EndCollision(object sender, CollisionInfo3D info) { var interactedEntity = this.UnregisterCollidedEntity(info); this.RemovePointerInteraction(interactedEntity); if (this.nearTouchCollisionEntities.Remove(interactedEntity)) { this.RunTouchHandlers(interactedEntity, (h, e) => h?.OnTouchCompleted(e)); } }
private void InternalTouch_BeginCollision(object sender, CollisionInfo3D info) { var interactedEntity = this.RegisterCollidedEntity(info); this.AddPointerInteraction(interactedEntity); this.RunTouchHandlers(interactedEntity, (h, e) => { this.nearTouchCollisionEntities.Add(interactedEntity); h?.OnTouchStarted(e); }); }
private void Cursor_BeginCollision(object sender, CollisionInfo3D info) { var cursorEntity = info.ThisBody.Owner; var interactedEntity = info.OtherBody.Owner; this.RunTouchHandlers(cursorEntity, interactedEntity, (h, e) => h?.OnTouchStarted(e)); if (!this.cursorCollisions.ContainsKey(cursorEntity)) { this.cursorCollisions[cursorEntity] = interactedEntity; } }
private void ExternalTouch_BeginCollision(object sender, CollisionInfo3D info) { var otherEntity = this.RegisterCollidedEntity(info); var hasHandler = otherEntity.HasEventHandlers <IMixedRealityTouchHandler, IMixedRealityPointerHandler>(); if (hasHandler) { this.externalTouchCollisionEntities.Add(otherEntity); } this.AddFocusableInteraction(otherEntity); }
private void PhysicBody_BeginCollision(object sender, CollisionInfo3D e) { var otherBodyEntity = e.OtherBody.Owner; Debug.WriteLine($"Ship collided with {otherBodyEntity.Name}"); if (otherBodyEntity.Name.StartsWith("asteroid")) { if (otherBodyEntity.IsVisible) { this.GameOver(); } } }
private void Body_BeginCollision(object sender, CollisionInfo3D e) { this.bodyCollision = true; }
private void Body_EndCollision(object sender, CollisionInfo3D e) { this.bodyCollision = false; }
private void FootRightBody_BeginCollision(object sender, CollisionInfo3D e) { this.footRCollision = true; }
private void FootRightBody_EndCollision(object sender, CollisionInfo3D e) { this.footRCollision = false; }