Exemplo n.º 1
0
    private void UpdateSelectedSlotData()
    {
        ourItemSlot.Icon    = itemSlot.Icon;
        ourItemSlot.nameObj = itemSlot.nameObj;
        ourItemSlot.UpdateIcon(itemSlot.Icon, itemSlot.nameObj);
        Animal animalScript = spawnManager.playerSelectedAnimal.GetComponent <Animal>();

        Name.text        = animalScript.name;
        costValue.text   = animalScript.costToSpawn.ToString();
        healthValue.text = animalScript.health.ToString();
        //damageValue.text = animalScript.damage.ToString();
    }
Exemplo n.º 2
0
    private void UpdateSelectedSlotData()
    {
        ourItemSlot.Icon    = itemSlot.Icon;
        ourItemSlot.nameObj = itemSlot.nameObj;
        ourItemSlot.UpdateIcon();
        Name.text = ourItemSlot.nameObj;
        GameObject foundAnimal  = animalManager.animalDict[ourItemSlot.nameObj];
        Animal     animalScript = foundAnimal.gameObject.GetComponent <Animal>();

        costValue.text   = animalScript.costToSpawn.ToString();
        healthValue.text = animalScript.health.ToString();
        //damageValue.text = animalScript.damage.ToString();
    }