Exemple #1
0
 public void RaiseEvent(E_EntityEvent key, EventSetData objInfo)
 {
     if (_outEventSet == null)
     {
         return;
     }
     _outEventSet.RaiseEvent(key, objInfo);
 }
Exemple #2
0
        // 改变动画的速率
        public void OnChangeAnimationSpeed(EventSetData param)
        {
            AnimationSpeedEventData data = param as AnimationSpeedEventData;

            if (data == null)
            {
                return;
            }
            ChangeAnimationSpeed(data.animation_speed);
        }
Exemple #3
0
        // Entity播放动画
        public void OnPlayAnimation(EventSetData param)
        {
            PlayAnimationEventData data = param as PlayAnimationEventData;

            if (data == null)
            {
                return;
            }
            PlayAnimation(data.animation_name);
        }
Exemple #4
0
        public bool RaiseEvent(TKey key, EventSetData param)
        {
            I_Condition condition;

            _conditionSet.TryGetValue(key, out condition);
            if (condition != null && !condition.IsTrue(param))
            {
                return(false);
            }
            return(_eventSet.RaiseEvent(key, param));
        }
Exemple #5
0
        // 改变当前玩家状态
        public void ChangeState(EventSetData param)
        {
            ChangeEntityStateEventData data = param as ChangeEntityStateEventData;

            if (data == null)
            {
                return;
            }
            if (GetState() == data.state_id && !data.force)
            {
                return;
            }
            SkillLog.Log("之前状态:{0},改变之后状态:{1}", GetState(), data.state_id);
            PerformTransition(data.state_id);
        }
Exemple #6
0
        public static void Push(EventSetData t) //where T : EventSetData
        {
            if (t == null)
            {
                return;
            }
            Type type = t.GetType();

            if (!_data.ContainsKey(type))
            {
                UnityEngine.Debug.LogFormat("Event Set Data .Push Error,type:[{0}]", type.ToString());
                return;
            }
            _data[type].Add(t);
            t.Reset();
        }
Exemple #7
0
 public void OnAction(BaseEntity entity, EventSetData param)
 {
     /*MoveToTargetPositionData data = param as MoveToTargetPositionData;
      * if (data == null) return;
      *
      * Vector3 entity_position = entity.WroldPosition;
      * int length = entity._targets.Count;
      * for (int i = 0; i < length; i++)
      * {
      *  BaseEntity target = entity._targets[i];
      *
      *  Vector3 target_postion = target.WroldPosition;
      *  Vector3 direction = target_postion - entity_position;
      *
      *  direction.y = 0;
      *  Vector3 distance = direction.normalized * data.distance;
      *  target._movement.MoveToTargetPostion(target_postion + distance, data.speed);
      * }*/
 }
Exemple #8
0
 private void OnBeHurt(EventSetData param)
 {
     EntityEventFactory.ChangeInEntityState(this, E_StateId.hurt);
 }
Exemple #9
0
 // 目标死亡
 private void EntityDie(EventSetData param)
 {
     EntityEventFactory.ChangeInEntityState(this, E_StateId.die);
 }
Exemple #10
0
 // 被内部调用,由内部触发
 public void RaiseEvent(E_EntityInTrigger key, EventSetData param)
 {
     _inEventSet.RaiseEvent(key, param);
 }
Exemple #11
0
 public void RaiseEvent(E_BuffEvent key, EventSetData data)
 {
     _buffEventSet.RaiseEvent(key, data);
 }
Exemple #12
0
 public void RaiseEvent(E_EntityInTrigger key, EventSetData obj_info)
 {
     // 父节点-->流程-->容器-->触发器
     _parent_node._skill_container._entity.RaiseEvent(key, obj_info);
     EventDataFactory.Push(obj_info);
 }
Exemple #13
0
 // 播放特效
 public void OnPlayEffect(EventSetData param)
 {
     EntityActionFactory.OnAction <EntityPlayEffectAction>(_baseEntity, param);
 }
Exemple #14
0
 public virtual void ReverseEffect(EventSetData data)
 {
 }
Exemple #15
0
 public virtual void ExcuteEffect(EventSetData data)
 {
 }