IEnumerator SetupBattle()
    {
        var fishIndex = Random.Range(0, fishPrefabs.Length);

        GameObject fishGO = Instantiate(fishPrefabs[fishIndex], fishStage);

        fishUnit      = fishGO.GetComponent <scr_fish>();
        fishUnit.dist = fishUnit.dist + Random.Range(-20, 10);
        fish_motion   = fishGO.GetComponent <Animator>();

        mainText.text = "An unidentified fish is on the line...";
        //Debug.Log("Fish: " + fishUnit.fishName);

        UIman.updateUI(fishUnit);

        yield return(new WaitForSeconds(2f));

        state = BattleState.PLAYERTURN;
        PlayerTurn();
    }
Beispiel #2
0
 public void revealFish(scr_fish fish)
 {
     FishName.text   = fish.fishName;
     FishRarity.text = fish.fishRarity;
 }
Beispiel #3
0
 public void updateUI(scr_fish fish)
 {
     Distance.text = fish.dist.ToString() + "m";
     Tension.value = fish.tens;
 }