protected void SetMovePaneDetails(int moveId, byte remainingPP) { PokemonMove move = PokemonMove.GetPokemonMoveById(moveId); textName.text = move.name; textPPValue.text = remainingPP + "/" + move.maxPP; textDescription.text = move.description; textPowerValue.text = move.power != 0 ? move.power.ToString() : "-"; textAccuracyValue.text = move.accuracy != 0 ? move.accuracy.ToString() : "-"; imageCategory.sprite = SpriteStorage.GetMoveTypeSprite(move.moveType); imageType.sprite = SpriteStorage.GetTypeSymbolSprite(move.type); ShowMovePane(); }
public void SetMoveById(int id, byte currentPP) { if (PokemonMove.MoveIdIsUnset(id)) { SetShowState(false); return; } SetShowState(true); PokemonMove move = PokemonMove.GetPokemonMoveById(id); textName.text = move.name; textPP.text = currentPP.ToString() + "/" + move.maxPP.ToString(); textDescription.text = move.description; textPowerValue.text = move.power != 0 ? move.power.ToString() : "-"; textAccuracyValue.text = move.accuracy != 0 ? move.accuracy.ToString() : "-"; imageType.sprite = SpriteStorage.GetTypeSymbolSprite(move.type); imageCategory.sprite = SpriteStorage.GetMoveTypeSprite(move.moveType); }
private void SetMovePaneDetails(int moveIndex) { PokemonMove move = GetMoves()[moveIndex]; if (move == null) { HideMovePane(); return; } byte[] remainingPPs = PlayerData .singleton .partyPokemon[currentPokemonIndex] .movePPs; textPPValue.text = remainingPPs[moveIndex] + "/" + move.maxPP; textPowerValue.text = move.power != 0 ? move.power.ToString() : "-"; textAccuracyValue.text = move.accuracy != 0 ? move.accuracy.ToString() : "-"; imageCategory.sprite = SpriteStorage.GetMoveTypeSprite(move.moveType); imageType.sprite = SpriteStorage.GetTypeSymbolSprite(move.type); ShowMovePane(); }