void ActionPlayer(Player player) { OtherPlayerController otherObject = GameObject.Find(player.nickname).GetComponent <OtherPlayerController>(); if (otherObject) { otherObject.playerAction = (int)player.playerStateAttack; } }
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; } }
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(); }
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()); } } }
public virtual void AddTrackCamera(OtherPlayerController temp) { Debug.LogError("Call AddTrackCamera in base class."); }
private void TryGetController() { if (!isGetController) { m_SinglePlayerController = GetComponent<SinglePlayerController>(); m_OtherPlayerController = GetComponent<OtherPlayerController>(); } if (m_SinglePlayerController != null || m_OtherPlayerController != null) { isGetController = true; } }