Examples of GameObject


Examples of com.sertaogames.cactus2d.GameObject

   
    /** Aqui definimos o zoom */
    float zoomScale = Cactus2DApplication.invCameraZoom;

    /** Cria��o do primeiro game object, passando um nome */
    GameObject go = new GameObject("splash");
   
    /** Posiscionamento do game object no meio da tela */
    go.transform.getPosition().set(Gdx.graphics.getWidth()/2-256f*zoomScale,Gdx.graphics.getHeight()/2-128f*zoomScale);
   
    /** Aqui dizemos que ele vai ser desenhado na tela com  a marca */
    SpriteRendererComponent sr = new SpriteRendererComponent(Cactus2DApplication.loadTexture("data/textures/SertaoGames-marca-512x256.png"));
    go.AddComponent(sr);
   
    /** Aqui dizemos que o game object faz parte da GUI */
    sr.gui = true;
   
    /** Aqui incluimos os componentes que representam comportamentos*/
    go.AddComponent(new SplashTouch()); // Torna o level toc�vel
    go.AddComponent(new LevelLoader(MenuLevel.class));// Ao fim deste l�vel, cassega o pr�ximo
    addGameObject(go);// Adciona o game object ao level
    }
View Full Code Here

Examples of com.sertaogames.cactus2d.GameObject


  @Override
  public void init() {
    objetos = gameObject.findAll("Objeto");
    GameObject gameObject = this.gameObject.find("Time");
    timeLabel = gameObject.getComponent(LabelComponent.class);
    gameObject = gameObject.find("Points");
    pointsLabel = gameObject.getComponent(LabelComponent.class);
    parent = this.parent;
  }
View Full Code Here

Examples of com.sertaogames.cactus2d.GameObject

      }
    }
  }

  public static void pause() {
    GameObject game = parent.find("Gui");
    game = game.find("Pause");
    if(game != null) {
      game.setActive(false);
    }
    nextState = state;
    state = GameState.PAUSE;
    MainLevel.pause();
    for (GameObject go : objetos) {
View Full Code Here

Examples of com.sertaogames.cactus2d.GameObject

 
  public static void unPause() {
    if(GameControllerComponent.state == GameState.PAUSE){
      state = nextState;
    }
    GameObject game = parent.find("Gui");
    game = game.find("Pause");
    if(GameControllerComponent.state == GameState.PLAYING && game != null) {
      game.setActive(true);
    }

    MainLevel.unPause();
    for (GameObject go : objetos) {
      go.setPaused(false);
View Full Code Here

Examples of com.threerings.parlor.game.data.GameObject

        labelC.weightx = 1.0;
        labelC.insets.left = 10;
        labelC.gridwidth = GridBagConstraints.REMAINDER;

        Name[] names = _turnObj.getPlayers();
        GameObject gameobj = (GameObject)_turnObj;
        boolean[] winners = gameobj.winners;
        Name holder = _turnObj.getTurnHolder();
        for (int ii=0, jj=0; ii < names.length; ii++, jj++) {
            if (names[ii] == null) continue;

            JLabel iconLabel = new JLabel();
            if (winners == null) {
                if (names[ii].equals(holder)) {
                    iconLabel.setIcon(_turnIcon);
                }
            } else if (gameobj.isDraw()) {
                iconLabel.setText(_drawText);
            } else if (winners[ii]) {
                iconLabel.setText(_winnerText);
            }
            iconLabel.setForeground(Color.BLACK);
View Full Code Here

Examples of com.threerings.parlor.game.data.GameObject

    protected int createGame (final Table table)
        throws InvocationException
    {
        try {
            GameManager gmgr = createGameManager(createConfig(table));
            GameObject gobj = (GameObject)gmgr.getPlaceObject();
            gameCreated(table, gobj, gmgr);
            return gobj.getOid();

        } catch (Throwable t) {
            log.warning("Failed to create manager for game", "config", table.config, t);
            throw new InvocationException(INTERNAL_ERROR);
        }
View Full Code Here

Examples of com.threerings.parlor.game.data.GameObject

            log.warning("Unable to find table for running game", "gameOid", gameOid);
            return;
        }

        // update this table's occupants information and update the table
        GameObject gameObj = (GameObject)_omgr.getObject(gameOid);
        table.updateOccupants(gameObj);
        updateTableInLobby(table);
    }
View Full Code Here

Examples of game.GameObject

      listeners.remove(GameListener.class, listener);
   }

   @Override
   public void onNewClient(NewClientEvent e) {
      final GameObject gameObject = new GameObject(e.getSource());
      gameObject.setX(100+(int) (System.currentTimeMillis() % 100));
      gameObject.setY(100+(int) (System.currentTimeMillis() % 100));
      gameObjects.put(gameObject.getId(), gameObject);
      updateAllClients();
   }
View Full Code Here

Examples of lineage2.gameserver.model.GameObject

  {
    if (id != COMMAND_IDS[0])
    {
      return false;
    }
    GameObject objectTarget = Config.OLYMPIAD_OLDSTYLE_STAT ? activeChar : activeChar.getTarget();
    if ((objectTarget == null) || !objectTarget.isPlayer() || !objectTarget.getPlayer().isNoble())
    {
      activeChar.sendPacket(SystemMsg.THIS_COMMAND_CAN_ONLY_BE_USED_BY_A_NOBLESSE);
      return true;
    }
    Player playerTarget = objectTarget.getPlayer();
    SystemMessage2 sm = new SystemMessage2(SystemMsg.FOR_THE_CURRENT_GRAND_OLYMPIAD_YOU_HAVE_PARTICIPATED_IN_S1_MATCHES_S2_WINS_S3_DEFEATS_YOU_CURRENTLY_HAVE_S4_OLYMPIAD_POINTS);
    sm.addInteger(Olympiad.getCompetitionDone(playerTarget.getObjectId()));
    sm.addInteger(Olympiad.getCompetitionWin(playerTarget.getObjectId()));
    sm.addInteger(Olympiad.getCompetitionLoose(playerTarget.getObjectId()));
    sm.addInteger(Olympiad.getNoblePoints(playerTarget.getObjectId()));
View Full Code Here

Examples of lineage2.gameserver.model.GameObject

    }
    if ((activeChar == null) || !activeChar.isPlayer())
    {
      return false;
    }
    GameObject flagPole = activeChar.getTarget();
    if (!(flagPole instanceof StaticObjectInstance) || (((StaticObjectInstance) flagPole).getType() != 3))
    {
      activeChar.sendPacket(SystemMsg.THE_TARGET_IS_NOT_A_FLAGPOLE_SO_A_FLAG_CANNOT_BE_DISPLAYED);
      return false;
    }
View Full Code Here
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.