Skip to content

Instantly share code, notes, and snippets.

@Brian1KB
Created March 19, 2017 21:54
Show Gist options
  • Save Brian1KB/9694cd2113efa2d6a81fe12365baa49a to your computer and use it in GitHub Desktop.
Save Brian1KB/9694cd2113efa2d6a81fe12365baa49a to your computer and use it in GitHub Desktop.
public enum TitleType
{
Clear = 0,
Reset = 1,
Title = 2,
SubTitle = 3,
ActionBar = 4,
AnimationTimes = 5
}
public virtual void SendTitle(string text, TitleType type = TitleType.Title, int fadeIn = 300, int fadeOut = 300,
int stayTime = 1000)
{
var mcpeSetTitle = McpeSetTitle.CreateObject();
mcpeSetTitle.fadeInTime = fadeIn;
mcpeSetTitle.stayTime = stayTime;
mcpeSetTitle.fadeOutTime = fadeOut;
mcpeSetTitle.type = (int) type;
mcpeSetTitle.text = text;
SendPackage(mcpeSetTitle);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment