protected override void Update() { base.Update(); circle.Position = container.ToLocalSpace(GetContainingInputManager().CurrentState.Mouse.Position); circle.Colour = MathExtensions.Collided(radius, circle.Position, box.Position, box.Size) ? Color4.Red : Color4.White; }
private bool checkHit(Vector2 cherryPosition) { var playerPosition = Player.PlayerPosition; return(MathExtensions.Collided( IWannaExtensions.CHERRY_RADIUS, cherryPosition, new Vector2(playerPosition.X - IWannaExtensions.PLAYER_HALF_WIDTH, playerPosition.Y - IWannaExtensions.PLAYER_HALF_HEIGHT), IWannaExtensions.PLAYER_SIZE)); }