All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.harium.etyl.animation.script.text.DialogScript Maven / Gradle / Ivy

There is a newer version: 1.0.18
Show newest version
package com.harium.etyl.animation.script.text;

import com.harium.etyl.core.animation.script.AnimationScript;
import com.harium.etyl.layer.TextLayer;

public class DialogScript extends AnimationScript {

	private String fullText;
	
	private TextLayer target;
	
	public DialogScript(TextLayer target, long time) {
		super(time);
		
		this.target = target;
		
		fullText = target.getText();
	}
	
	@Override
	public void calculate(double factor) {
		
		int lastChar = (int)(fullText.length()*factor);
		
		target.setText(fullText.substring(0, lastChar));
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy