public void OnAnswerChanged(Answer ans, int[] indices, ValueChangeType changeType) { if (AnswerChanged != null) { AnswerChanged(ans, new AnswerChangedEventArgs(ans != null ? ans.Name : null, indices, changeType)); } }
public void valueChangedCenter(int id, int valueAfaterChange, int delta, ValueChangeType valueType) { entityID2ValuechangedDelegates[id]?.Invoke(valueType); if (selectedEntity != null && id == selectedEntity.entityID) { onSelectedEntityValueChange(valueType); } }
private void OnMPChangeCallBack(ValueChangeType type) { if (info == null) { return; } UIPlayerHeadBarInfoView.Instance.SetMP(info.CurrentMP, info.MaxMP); }
private void onEntityDataChange(ValueChangeType changeType) { bool selected = GameEntityMgr.IsEntitySelected(showEntity.entityID); GameEntity gameEntity = GameEntityMgr.Instance.GetGameEntity(showEntity.entityID); selectedBg.SetActive(selected); EntityAnimStatus status = gameEntity.GetEntityVisual().Status; deathBg.SetActive(!gameEntity.BeAlive()); beAttackBg.SetActive(changeType == ValueChangeType.HPDown); beMovingBg.SetActive(status == EntityAnimStatus.Run); }
private void OnHPChangeCallBcak(ValueChangeType type) { int totalCurHp = 0; int totalMaxHp = 0; for (int i = 0; i < Global.FightHeroList.Count; i++) { HeroInfo info = GameSceneCtrl.Instance.HeroInfoList.Find(x => x.RoleId == Global.FightHeroList[i]); totalCurHp += info.CurrentHP; totalMaxHp += info.MaxHP; } //UIPlayerInfoView.Instance.SetHp(totalCurHp, totalMaxHp); }
public AnswerChangedEventArgs(string variableName, int[] indices, ValueChangeType changeType) { _variableName = variableName; _indices = indices; _changeType = changeType; }