protected virtual void RPC_S2C_SkillCastShoot(uLink.BitStream stream, uLink.NetworkMessageInfo info) { int skillID = stream.Read <int>(); Vector3 pos = stream.Read <Vector3>(); DefaultPosTarget target = new DefaultPosTarget(pos); SkillRunner caster = Runner as SkillRunner; if (null != caster && !caster.IsController) { caster.RunEffOnProxy(skillID, target); } }
void RPC_S2C_SkillCastShoot(uLink.BitStream stream, uLink.NetworkMessageInfo info) { int skillID; Vector3 pos; stream.TryRead <int>(out skillID); stream.TryRead <Vector3>(out pos); DefaultPosTarget target = new DefaultPosTarget(pos); SkillRunner caster = Runner as SkillRunner; if (null != caster) { caster.RunEffOnProxy(skillID, target); } }
void RPC_S2C_SkillCast(uLink.BitStream stream, uLink.NetworkMessageInfo info) { int _skillID; uLink.NetworkViewID _viewID; stream.TryRead <int>(out _skillID); stream.TryRead <uLink.NetworkViewID>(out _viewID); SkillRunner caster = Runner as SkillRunner; if (null != caster) { ISkillTarget target = null; uLink.NetworkView view = uLink.NetworkView.Find(_viewID); if (null != view) { NetworkInterface network = view.GetComponent <NetworkInterface>(); target = (null == network) ? null : network.Runner; } caster.RunEffOnProxy(_skillID, target); } }