Beispiel #1
0
    protected override void OnDead()
    {
        base.OnDead();
        monsterActionFsm.FireEvent(this, DeadEventArgs.EventId, this.Id);

        GameEntry.Event.Fire(this,
                             ReferencePool.Acquire <DeadEventArgs> ().Fill(this.monsterData.Camp, this.monsterData));
    }
Beispiel #2
0
    /// <summary>
    /// 执行攻击
    /// </summary>
    public void PerformAttack()
    {
        IsAtkCDing = true;
        monsterStateFsm.FireEvent(this, MonsterAttackEventArgs.EventId);

        foreach (Weapon weapon in manualWeapons)
        {
            weapon.Attack(monsterData.Atk);
        }
    }
Beispiel #3
0
    /// <summary>
    /// 执行攻击
    /// </summary>
    public void PerformAttack()
    {
        if (IsDead)
        {
            return;
        }

        IsAtkCDing = true;
        heroStateFsm.FireEvent(this, HeroAttackEventArgs.EventId);

        // 发射手动触发类型的武器
        foreach (Weapon weapon in manualWeapons)
        {
            if (weapon.CostMP > 0 && heroData.MP < weapon.CostMP)
            {
                continue;
            }

            heroData.CostMP(weapon.CostMP);
            weapon.Attack(heroData.Atk);
        }

        SendRefreshPropEvent();
    }
Beispiel #4
0
 protected override void OnDead()
 {
     base.OnDead();
     heroActionFsm.FireEvent(this, DeadEventArgs.EventId, this.Id);
 }