Пример #1
0
    // 更新触发状态(继承自sdBehaviourState)aa
    public override void UpdateState()
    {
        if (mIsInState == true)
        {
            mCurrentDelayTime -= Time.deltaTime;
            if (mCurrentDelayTime <= 0.0f)
            {
                MonsterAutoFight kMonsterAutoFight = mBehaviourAdvancedState.MonsterAutoFightComponent;
                PetAutoFight     kPetAutoFight     = kMonsterAutoFight as PetAutoFight;
                if (kPetAutoFight != null)
                {
                    sdGameMonster kMonster = kMonsterAutoFight.Actor as sdGameMonster;
                    if (kMonster != null)
                    {
                        int iSkillID = mSkillID;
                        if (iSkillID == -1 || iSkillID == 0)
                        {
                            iSkillID = (int)kMonster.Property["SpSkill"];                               //< 尝试获取手动技能aa
                        }
                        int iErroeCode = 0;
                        kPetAutoFight.DoXPSkill(iSkillID, ref iErroeCode);
                    }
                }

                mCurrentDelayTime = 0.0f;
            }
        }
    }
Пример #2
0
    // 瀹犵墿鎵嬪姩鎶€鑳肩鐢ㄤ簬瀹犵墿)aa
    public bool DoXPSkill(ref int iErrorCode)
    {
        if (GetActorType() == ActorType.AT_Pet)
        {
            PetAutoFight kPetAutoFight = mAutoFight as PetAutoFight;
            int          iSkillId      = (int)Property["SpSkill"];
            if (iSkillId != 0)
            {
                return(kPetAutoFight.DoXPSkill(iSkillId, ref iErrorCode));
            }
        }

        return(false);
    }