Exemplo n.º 1
0
 protected override void initializeEvery()
 {
     base.initializeEvery();
     if (!battler)
     {
         battler = findParent <MapBattler>();
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 作用到MapBattler
        /// </summary>
        /// <param name="battler"></param>
        /// <returns></returns>
        protected virtual bool applyBattler(MapBattler battler)
        {
            if (!isTarget(battler))
            {
                return(false);
            }

            applyRuntimeBattler(battler.runtimeBattler);
            applyMapBattler(battler);

            return(true);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 应用到运行时数据
 /// </summary>
 /// <param name="battler"></param>
 protected virtual void applyMapBattler(MapBattler battler)
 {
     battler.playTargetAnimation(skill.targetAnimation());
 }
Exemplo n.º 4
0
 /// <summary>
 /// 是否为技能目标
 /// </summary>
 protected virtual bool isTarget(MapBattler battler)
 {
     return(battler.runtimeBattler.isTargetEnable() &&
            this.battler.opponents().Contains(battler));
 }
Exemplo n.º 5
0
 /// <summary>
 /// 初始化战斗者
 /// </summary>
 void initializeBattler()
 {
     battler = findParent <MapBattler>();
     battler?.addSkillProcessor(this);
 }