Player.sendTitle

Sends a title message that will be displayed at the centre of the screen. The Title struct can be used to control the title message, the subtitle and the timing for the animations (fade in, stay and fade out).

  1. void sendTitle(Title title, Subtitle subtitle, uint fadeIn, uint stay, uint fadeOut)
  2. void sendTitle(Title title, uint fadeIn, uint stay, uint fadeOut)
  3. void sendTitle(string title, string subtitle, uint fadeIn, uint stay, uint fadeOut)
    class Player
    void
    sendTitle
    (
    string title
    ,
    string subtitle = ""
    ,
    uint fadeIn = 10
    ,
    uint stay = 40
    ,
    uint fadeOut = 10
    )

Examples

// fade in, display title and subtitle and fade out
player.sendTitle("title", "subtitle");

// display a title for 3 seconds
player.sendTitle(Title(Format.green, "green title"), 60);

// display a subtitle for 10 seconds and fade out in 5 seconds
player.sendTitle(Title.init, Subtitle("subtitle"), 0, 200, 100);

Meta