コード例 #1
0
    void ActionPlayer(Player player)
    {
        OtherPlayerController otherObject = GameObject.Find(player.nickname).GetComponent <OtherPlayerController>();

        if (otherObject)
        {
            otherObject.playerAction = (int)player.playerStateAttack;
        }
    }
コード例 #2
0
    void DeadReckoning(Player player)
    {
        OtherPlayerController otherObject = GameObject.Find(player.nickname).GetComponent <OtherPlayerController>();

        //otherObject.SetPlayerMove(player.playerMove);
        // otherObject.playerMove = (int)player.playerMove;
        if (otherObject)
        {
            otherObject.playerMove = (int)player.playerMove;
        }
    }
コード例 #3
0
ファイル: PlayerManager.cs プロジェクト: ehuaa/NetEase
    public void OtherPlayerDie(MsgSCPlayerDie msg)
    {
        if (playerArray.ContainsKey(msg.userID) == false)
        {
            return;
        }

        GameObject            obj = this.playerArray[msg.userID];
        OtherPlayerController opc = obj.GetComponent <OtherPlayerController>();

        opc.Death();
    }
コード例 #4
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());
            }
        }
    }
コード例 #5
0
 public virtual void AddTrackCamera(OtherPlayerController temp)
 {
     Debug.LogError("Call AddTrackCamera in base class.");
 }
コード例 #6
0
    private void TryGetController()
    {
        if (!isGetController)
        {
            m_SinglePlayerController = GetComponent<SinglePlayerController>();
            m_OtherPlayerController = GetComponent<OtherPlayerController>();
        }

        if (m_SinglePlayerController != null || m_OtherPlayerController != null)
        {
            isGetController = true;
        }
    }