Exemplo n.º 1
0
        /// <summary>
        /// 作用到MapEntity
        /// </summary>
        public virtual bool apply(MapEntity entity)
        {
            //if (!entity.isApplyable() || !isApplyValid())
            if (!isApplyValid())
            {
                return(false);
            }

            var battler = entity as MapBattler;

            if (battler != null)
            {
                return(applyBattler(battler));
            }

            return(applyEntity(entity));
        }
Exemplo n.º 2
0
        public virtual bool apply(MapEntity entity)
        {
            if (entity == null)
            {
                return(false);
            }
            if (!skillProcessor.apply(entity))
            {
                return(false);
            }

            // 不可无限穿透同时穿透个数超出最大个数
            if (throughEntities != -1 &&
                entityCnt++ >= throughEntities)
            {
                destroy();
            }
            return(true);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 作用到MapEntity(实际)
 /// </summary>
 protected virtual bool applyEntity(MapEntity entity)
 {
     return(true);
 }