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

com.ng.gdxutils.model.GroupBuilder Maven / Gradle / Ivy

The newest version!
package com.ng.gdxutils.model;

import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.scenes.scene2d.Stage;

/**
 * (c) 2016 Abhishek Aryan
 *
 * @author Abhishek Aryan
 * @since 24-07-2016
 */

public class GroupBuilder {
	
	public static Group makeGroup(Group group, float startX, float startY, float width, float height, String name) {
		Group localGroup= new Group();
		localGroup.setPosition(startX, startY);
		localGroup.setSize(width, height);
		localGroup.setOrigin(localGroup.getWidth()/2f,localGroup.getHeight()/2f);
		localGroup.setName(name);
		group.addActor(localGroup);
		return localGroup;
	}
	
	public static Group makeGroup(Stage stage, float startX, float startY, float width, float height, String name) {
		Group localGroup=new Group();
		localGroup.setPosition(startX, startY);
		localGroup.setSize(width, height);
		localGroup.setName(name);
		stage.addActor(localGroup);
		return localGroup;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy