void on_exp_ui_sync(string name, object udata) { ui_exp_info info = (ui_exp_info)udata; this.exp_process.fillAmount = (float)info.exp / (float)info.total; this.exp_label.text = info.exp + " / " + info.total; }
void sync_exp_ui() { this.ui_blood.set_level(this.level + 1); if (!this.is_ghost) { ui_exp_info info = new ui_exp_info(); int now = 0, total = 0; game_config.exp_upgrade_level_info(this.config, this.exp, ref now, ref total); info.exp = now; info.total = total; event_manager.Instance.dispatch_event("exp_ui_sync", info); } }