Example #1
0
 public PlayerInput(Game game) {
   this.game = game;
   this.gameApp = game.getGameApplication();
   inputManager = gameApp.getInputManager();
   inputManager.addRawInputListener(this);
   mouseStatus = new MouseStatus(null, 0, 0);
 }
Example #2
0
  public void beginInput() {
    mouseStatus = gameApp.getMouseCollision();
    PlayerControler p = game.getPlayerControler();

    if (mouseStatus != null) {
      if (mouseStatus.getModel() != null) {
        p.mouseHover((Unit) mouseStatus.getModel().getParent());
      } else {
        p.mouseHover(null);
      }
    } else {
      p.mouseHover(null);
    }
  }
Example #3
0
  public Buff(Game game, String bt, Unit u) {
    this.buffType = BuffType.getBuffType(bt);

    this.owner = u;
    this.gameApp = game.getGameApplication();

    model = gameApp.getAssetManager().loadModel(buffType.getModel());

    for (int i = 0; i < buffType.getAttachmentPoints().length; i++) {
      u.getModel().addModel(model, buffType.getAttachmentPoints()[i]);
    }

    u.addBuff(this);
  }