Package ponkOut.graphics

Source Code of ponkOut.graphics.BallGO

/* Copyright 2010 Christian Matt
*
* This file is part of PonkOut.
*
* PonkOut is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PonkOut is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PonkOut.  If not, see <http://www.gnu.org/licenses/>.
*/

package ponkOut.graphics;

import org.lwjgl.util.vector.Vector2f;
import org.lwjgl.util.vector.Vector3f;

import ponkOut.logic.Ball;

public abstract class BallGO extends WorldObject {
  protected Ball ball;

  public BallGO(Ball ball, Appearance appearance, GraphicsObjectsManager goManager) {
    super(appearance, goManager);
    this.ball = ball;
  }

  @Override
  public Vector3f getPosition() {
    Vector2f pos = ball.getPosition();
    return new Vector3f(pos.x, pos.y, 0.0f);
  }
}
TOP

Related Classes of ponkOut.graphics.BallGO

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.