Ejemplo n.º 1
0
  public void onMonster2(View view) {
    // If user picks this monster start a game with it
    if (_myPlayer == null) {
      _myPlayer = new Player(Monster.MonsterType.MONSTER_TWO);
      _enemyPlayer = new Player(Monster.MonsterType.MONSTER_ONE);

      if (!_isSinglePlayer)
        _btController.sendPacket(new Packet(PacketCodes.PICK_MONSTER, PacketCodes.MONSTER2));

      createGame();
    }
  }
Ejemplo n.º 2
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.select_activity);

    _playerUsername = ((BluetoothApplication) this.getApplicationContext())._username;
    _isSinglePlayer = getIntent().getBooleanExtra(ConnectActivity.SINGLE_PLAYER, false);

    if (!_isSinglePlayer) {
      _btController = ((BluetoothApplication) this.getApplicationContext())._bluetoothController;
      _btController.changeActivity(this, this);
      _btController.sendPacket(new Packet(PacketCodes.PLAYER_NAME, _playerUsername));
    }
  }