public void UpdateData(RoleData role, bool isLostKnowledge = false) { roleData = role; _isLostKnowledge = isLostKnowledge; bookData = !_isLostKnowledge?roleData.GetCurrentBook() : roleData.GetLostKnowledge(); skillData = bookData != null?bookData.GetCurrentSkill() : null; }
void refreshEnemy() { RoleData enemy = BattleLogic.Instance.CurrentEnemyRole; enemyBody.sprite = Statics.GetHalfBodySprite(enemy.HalfBodyId); enemyBody.SetNativeSize(); refreshEnemyBlood(); enemyNameText.text = enemy.Name; if (enemy.GetCurrentBook() != null) { enemyBookIconImage.transform.parent.gameObject.SetActive(true); enemyBookIconImage.sprite = Statics.GetIconSprite(enemy.GetCurrentBook().IconId); enemyBookIconImage.SetNativeSize(); } else { enemyBookIconImage.transform.parent.gameObject.SetActive(false); } }