//if the player has dash stacks available, consume and execute void StartDashing() { if (player.dashStacks > 0) { dashing = true; walking = false; player.GetComponent <TrailRenderer> ().time = 0.1f; //activate trail renderer animation player.energy -= player.energySpend; } }
void StartBattle() { state = GameState.Battle; battleSystem.gameObject.SetActive(true); worldCamera.gameObject.SetActive(false); var playerParty = playerController.GetComponent <PokemonParty>(); var wildPokemon = FindObjectOfType <MapArea>().GetComponent <MapArea>().GetRandomWildPokemon(); battleSystem.StartBattle(playerParty, wildPokemon); }
public void RegisterKill(float time, GameObject enemy) { if (swipeCont.dashing) { killStacks++; enemy.GetComponent <Enemy>().CreateCorpse(true); } else { killStacks = 0; enemy.GetComponent <Enemy>().CreateCorpse(false); } if (killStacks > 2) { player.GetComponent <PlayerCont> ().Boost(killStacks); } }