コード例 #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);
    }
コード例 #5
0
        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;
 }