예제 #1
0
 public void OnAnswerChanged(Answer ans, int[] indices, ValueChangeType changeType)
 {
     if (AnswerChanged != null)
     {
         AnswerChanged(ans, new AnswerChangedEventArgs(ans != null ? ans.Name : null, indices, changeType));
     }
 }
예제 #2
0
 public void valueChangedCenter(int id, int valueAfaterChange, int delta, ValueChangeType valueType)
 {
     entityID2ValuechangedDelegates[id]?.Invoke(valueType);
     if (selectedEntity != null && id == selectedEntity.entityID)
     {
         onSelectedEntityValueChange(valueType);
     }
 }
예제 #3
0
 private void OnMPChangeCallBack(ValueChangeType type)
 {
     if (info == null)
     {
         return;
     }
     UIPlayerHeadBarInfoView.Instance.SetMP(info.CurrentMP, info.MaxMP);
 }
예제 #4
0
    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);
        }
예제 #6
0
 public AnswerChangedEventArgs(string variableName, int[] indices, ValueChangeType changeType)
 {
     _variableName = variableName;
     _indices      = indices;
     _changeType   = changeType;
 }