public void SetMonsterStats(MonsterStats monster) { SetMonsterElements(monster); if (monster == null) { return; } textMonsterName.text = monster.GetComponent <MonsterStats>().monsterName; minAtk = monster.monsterMinATK; maxAtk = monster.monsterMaxATK; def = monster.monsterHP; loot = monster.monsterLoot; honor = monster.monsterHonor; if (elementAtk != Element.NULL) { minAtk *= 2; maxAtk *= 2; } if (elementDef != Element.NULL) { def *= 2; } if (randomAtk == 0) { randomAtk = atk = Random.Range(minAtk, maxAtk + 1); textMinAtkMonsterStats.gameObject.SetActive(true); textMaxAtkMonsterStats.gameObject.SetActive(true); textAtkMonsterStats.gameObject.SetActive(false); } UpdateUIMonster(); }