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

com.artemis.component.Position Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package com.artemis.component;

import com.artemis.Component;
import com.artemis.util.Vec2f;

public class Position extends Component
{
	public float x;
	public float y;

	public Position xy(float x, float y)
	{
		this.x = x;
		this.y = y;
		return this;
	}

	public Position add(Vec2f vec)
	{
		this.x += vec.x;
		this.y += vec.y;
		return this;
	}

	@Override
	public String toString() {
		return "Position [x=" + x + ", y=" + y + "]";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy