Esempio n. 1
0
 /// <summary>
 /// 添加动作实体
 /// </summary>
 /// <param name="actionEntity"></param>
 public void AddActionEntity(SkillActionEntity actionEntity)
 {
     actionEntity.startCallback = OnActionStart;
     actionEntity.endCallback   = OnActionEnd;
     currentActionEntities.Add(actionEntity);
     actionEntity.Start();
 }
Esempio n. 2
0
        /// <summary>
        /// 创建技能动作实体
        /// </summary>
        /// <param name="action"></param>
        /// <returns></returns>
        public static SkillActionEntity CreateSkillActionEntity(SkillAction action)
        {
            SkillActionEntity entity = new SkillActionEntity();

            entity.action = action;
            return(entity);
        }
Esempio n. 3
0
        /// <summary>
        /// 检查动作开始
        /// </summary>
        protected void CheckActionsStart()
        {
            foreach (SkillAction action in actions)
            {
                if (currentTime >= action.startTime)
                {
                    startActions.Add(action);
                }
            }

            if (startActions.Count > 0)
            {
                foreach (SkillAction action in startActions)
                {
                    actions.Remove(action);
                    SkillActionEntity actionEntity = SkillHelper.CreateSkillActionEntity(action);
                    if (actionEntity != null)
                    {
                        AddActionEntity(actionEntity);
                    }
                }
                startActions.Clear();
            }
        }
Esempio n. 4
0
 public virtual void Reset(SkillActionEntity entity)
 {
 }
Esempio n. 5
0
 public virtual void End(SkillActionEntity entity)
 {
 }
Esempio n. 6
0
 public virtual void Update(SkillActionEntity entity, float delatTime)
 {
 }
Esempio n. 7
0
 public virtual void Start(SkillActionEntity entity)
 {
 }
Esempio n. 8
0
 /// <summary>
 /// 动作结束回调
 /// </summary>
 /// <param name="action"></param>
 protected void OnActionEnd(SkillActionEntity actionEntity)
 {
     actionEntity.startCallback = null;
     actionEntity.endCallback   = null;
 }
Esempio n. 9
0
 /// <summary>
 /// 动作开始回调
 /// </summary>
 /// <param name="action"></param>
 protected void OnActionStart(SkillActionEntity actionEntity)
 {
 }
Esempio n. 10
0
 /// <summary>
 /// 移除动作实体
 /// </summary>
 /// <param name="actionEntity"></param>
 public void RemoveActionEntity(SkillActionEntity actionEntity)
 {
     currentActionEntities.Remove(actionEntity);
 }
Esempio n. 11
0
 public override void Start(SkillActionEntity entity)
 {
     UnityEngine.Debug.Log("SA_Camera Start");
 }
Esempio n. 12
0
 public override void End(SkillActionEntity entity)
 {
     UnityEngine.Debug.Log("SA_Camera End");
 }
Esempio n. 13
0
 public override void Update(SkillActionEntity entity, float delatTime)
 {
     UnityEngine.Debug.Log("SA_Camera Update:" + entity.currentTime);
 }
Esempio n. 14
0
 public override void Start(SkillActionEntity entity)
 {
     UnityEngine.Debug.Log("SA_PlayEffect Start");
 }
Esempio n. 15
0
 public override void End(SkillActionEntity entity)
 {
     UnityEngine.Debug.Log("SA_PlayEffect End");
 }