Exemplo n.º 1
0
        public void Kill()
        {
            NPC.BeginDying();

            if (_mouseoverName != null)
            {
                _mouseoverName.Close();
                _mouseoverName = null;
            }
        }
Exemplo n.º 2
0
 private void CreateMouseoverName()
 {
     _mouseoverName = new XNALabel(new Rectangle(1, 1, 1, 1), Constants.FontSize08pt75)
     {
         Visible   = false,
         Text      = NPC.Data.Name,
         ForeColor = Color.White,
         AutoSize  = false,
         DrawOrder = (int)ControlDrawLayer.BaseLayer + 3
     };
     _mouseoverName.DrawLocation = new Vector2(
         DrawArea.X + (DrawArea.Width - _mouseoverName.ActualWidth) / 2f,
         DrawArea.Y + TopPixel - _mouseoverName.ActualHeight - 4);
     _mouseoverName.ResizeBasedOnText();
 }