示例#1
0
        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());
            }
        }
示例#2
0
        void RecvCast(byte[] pckData, NetworkMessageInfo info)
        {
            //ServerCheck

            S2C.SkillCastInfo castInfo = new S2C.SkillCastInfo();
            castInfo.DeserializeFromBytes(pckData);

            return;
        }