示例#1
0
 public void OnBattleDone()
 {
     encounterScreen.SetActive(false);
     mainCamera.SetActive(true);
     player.SetActive(true);
     player.GetComponent <Damagable>().SetHealth(lm.GetCurrentHealth());
     Debug.LogWarning(lm.GetCurrentHealth());
 }
示例#2
0
    // Start is called before the first frame update
    void Start()
    {
        lm           = new LegacyManager();
        potionCount  = lm.GetPotion();
        playerHealth = player.GetComponent <Damagable>();
        playerBehave = player.GetComponent <PlayerBehaviours>();


        if (potionText != null)
        {
            potionText.text = "X " + potionCount;
        }

        if (player == null)
        {
            return;
        }
        playerHealth.maxHealth = lm.GetMaxHealth();
        playerHealth.SetHealth(lm.GetCurrentHealth());


        //player.GetComponent<Damager>().damage = lm.GetDamage();
        playerBehave.attackDelay  = lm.GetAttackSpeed();
        playerBehave.maxArrowAmmo = lm.GetMaxArrow();

        if (playerBehave.ammoBar != null)
        {
            playerBehave.ammoBar.maxValue = lm.GetMaxArrow();
            playerBehave.ammoBar.value    = lm.GetMaxArrow();
        }
    }