public virtual bool OnCollidedWith(Fixture f, TutorialMonster monster, Fixture f2, Contact info) { if (!used) { monster.EndChase(); used = true; } return true; }
public virtual bool OnCollidedWith(Fixture f, UserControlledCharacter obj, Fixture f2, Contact info) { if (!used) { var monster = new TutorialMonster(Position - PhysicsConstants.PixelsToMeters(new Vector2(300, 800)), Vector2.UnitX); levelManager.RegisterEntity(monster); monster.StartChase(); Engine.CameraLock = true; Engine.Camera.MoveCameraTo(new Vector3(-PhysicsConstants.MetersToPixels(obj.Position.X) + 400, -PhysicsConstants.MetersToPixels(obj.Position.Y) + 400, 0)); used = true; } return true; }