phaser-teletype
v0.1.4
Published
Simple typing animation
Downloads
1
Readme
Use
var teletype = game.add.teletype({
autoStart: true,
cursorChar: "_",
rate: 20,
text: "Amazingly few discotheques provide jukeboxes",
textTarget: textOrBitmapTextObject
});
// Without `autostart`:
teletype.start();
// Events:
teletype.onComplete.add(function (){
// …
});
Options
Options must include text
, textTarget
, and either rate
or duration
.
autoStart
: start immediately (default:false
)rate
: typing speed (characters/second); 10–30 is typicalduration
: length of the entire animation (ms)cursorChar
: character placed at the end oftext
(default: empty string)text
textTarget
: a BitmapText or Text object