title: How to Type word by word or line by line in Phaser Js?
body: <p>I need an animation in which a sentanace needs to be shown word by word. I was thinking of splitting the sentanace by space or dot, and then a timer or loop to display them. I am confused where to use this, in <code>create</code> or <code>update</code> function? 
  I also dont need the <code>bitmapText</code> option.</p>
  
  <p>I have seen examples like, but I dont know how to use this in update function:</p>
  
  <pre><code>animateTextShow: function(textObject,message,fps){
      if(!fps || fps == 0){
        textObject.setText(message);
      }else{
        var nextWordIndex = 1;
        var id;
        var words = message.split(' ');
        id = setInterval(function(){
          textObject.setText(words.slice(0,nextWordIndex).join(' '));
          ++nextWordIndex;
          if(nextWordIndex &gt;= words.length){
            clearInterval(id);
          }
        },1000/fps);
      }
    }
  </code></pre>
  
  <p>Can anyone give any ideas with some example code?</p>