void BroadcastCast(SkillInfo info) { if (!Network.isServer) return; S2C.SkillCastInfo castInfo = new S2C.SkillCastInfo(info.skillData.skillName, player.GetOwner()); if (!ServerGame.Inst.isDedicatedServer) { GetComponent<NetworkView>().RPC("RecvCast", RPCMode.All, castInfo.SerializeToBytes()); } else { GetComponent<NetworkView>().RPC("RecvCast", RPCMode.Others, castInfo.SerializeToBytes()); } }
void RecvCast(byte[] pckData, NetworkMessageInfo info) { //ServerCheck S2C.SkillCastInfo castInfo = new S2C.SkillCastInfo(); castInfo.DeserializeFromBytes(pckData); return; }