コード例 #1
0
ファイル: PlayerManager.cs プロジェクト: ehuaa/NetEase
    public void MoveOPlayer(MsgSCMoveTo msg)
    {
        GameObject[] obj = GameObject.FindGameObjectsWithTag("otherPlayer");

        for (int k = 0; k < obj.Length; k++)
        {
            OtherPlayerController opc = obj[k].GetComponent <OtherPlayerController>();

            if (msg.GetUserID() == opc.GetComponent <EntityAttributes>().ID)
            {
                opc.MoveTo(msg.GetMovement());
            }
        }
    }