public override void CondTstFunc(SkFuncInOutPara funcInOut) { base.CondTstFunc(funcInOut); Entity.SendMsg(EMsg.Skill_CheckLoop, funcInOut); if (funcInOut._ret && IsController()) { if (funcInOut._inst._target != null) { SendBLoop(funcInOut._inst.SkillID, funcInOut._inst._target.GetId(), funcInOut._ret); } else { SendBLoop(funcInOut._inst.SkillID, 0, funcInOut._ret); } } else { SetCondRet(funcInOut); } }
public void OnMsg(EMsg msg, params object[] args) { switch (msg) { case EMsg.Skill_CheckLoop: SkFuncInOutPara funcInOut = args[0] as SkFuncInOutPara; if (null != funcInOut) { if (null != funcInOut._para) { string param = funcInOut._para as string; if (null != param && param == "SwordAttack") { if (null != m_TwoHandWeaponAttack.sword) { funcInOut._ret = m_TwoHandWeaponAttack.CheckContinueAttack(); } else if (null != m_SwordAttack.sword) { funcInOut._ret = m_SwordAttack.CheckContinueAttack(); } } } } break; case EMsg.View_Prefab_Build: BiologyViewCmpt obj = args[0] as BiologyViewCmpt; HumanPhyCtrl phyCtrl = obj.monoPhyCtrl; m_SwordAttack.phyMotor = phyCtrl; m_TwoHandWeaponAttack.phyMotor = phyCtrl; m_JetPackAction.m_PhyCtrl = phyCtrl; m_ParachuteAction.m_PhyCtrl = phyCtrl; m_GliderAction.m_PhyCtrl = phyCtrl; m_HeavyEquipmentCtrl.phyCtrl = phyCtrl; m_RopeGunAction.phyCtrl = phyCtrl; m_IKAimCtrl = obj.monoIKAimCtrl; m_GunFire.ikAim = m_IKAimCtrl; m_BowShoot.ikAim = m_IKAimCtrl; CheckGloves(); Invoke("ResetWeapon", 0.5f); break; case EMsg.View_Prefab_Destroy: DeletGloves(); break; case EMsg.Battle_OnShoot: if (null != m_Gun) { m_GunHold.OnFire(); } if (null != m_Bow) { m_BowHold.OnFire(); } break; case EMsg.View_FirstPerson: m_SwordAttack.firstPersonAttack = (bool)args[0]; m_TwoHandWeaponAttack.firstPersonAttack = (bool)args[0]; break; } }