コード例 #1
0
    IEnumerator     AcceptSummonSkull(ZMNetData mData)
    {
        _PlayerID = mData.readInt();
        MonsterID = mData.readInt();
        int    PetMaxHP         = mData.readInt();
        string skullInfo        = mData.readString();
        int    playerInstanceID = mData.readInt();
        int    MonsterIDUse     = 0;

        MonsterIDUse = MonsterID;
        //	Debug.Log(	"K_____)(——+——+——+——+——+——+——+——+——+——+——返回骷髅ID:"+MonsterID	);

        if (PlayerUtil.isMine(playerInstanceID))
        {
            _PetNetView = FindPetNetViewBySummonerID(_PlayerID);

            if (_PetNetView != null)
            {
                //		Debug.Log(	"K_____)(——+——+——+——+——+——+——+——+——+——+——返回骷髅ID找到了! = "	+	MonsterID	);
                _PetNetView.MonsterID = MonsterIDUse;
                string SData = "" + MonsterIDUse;
                //		KDebug.Log(	"...................骷髅同步实例 = "	+	MonsterID,	_PetNetView.transform,	Color.yellow	);
                _PetNetView.SendMessage("AcceptSummon", SData);
            }
        }
        else
        {
            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            GameObject go = ObjectAccessor.getAOIObject(playerInstanceID);
            if (go)
            {
                go.SendMessage("ReturnCallSkull", string.Format("{0};{1};{2}", skullInfo, MonsterIDUse, playerInstanceID), SendMessageOptions.DontRequireReceiver);
            }
        }
    }