public void invoke(StateChangeEvent eventObject) { if (eventObject.State == EntityState.FacingRight && !eventObject.NewValue.Equals(eventObject.OldValue)) { for (int shapeIndex = 0; shapeIndex < bodyList.Count; shapeIndex++) { CollisionBody body = bodyList[shapeIndex]; CollisionManager.Instance.removeContainer(body); body.MirrorHorizontal(owner.getVectorProperty(EntityProperty.Position)); CollisionManager.Instance.addContainer(body); } } }
public void invoke(StateChangeEvent eventObject) { if (isEnabled) { if (eventObject.State == EntityState.OnAir) { this.onAir = eventObject.NewValue; } } }