private void Start() { // いろいろ取得 gameManager = GameObject.FindWithTag(Tags.GameManager).GetComponent <MyGameManager>(); humanMover = GetComponent <PlayerHumanMover>(); mouseLooker = GetComponent <MouseLooker>(); humanAnimator = GetComponent <HumanAnimator>(); humanGrabing = GetComponent <HumanGrabing>(); // 移動のスタート関数 humanMover.StartM(); if (photonView.IsMine) { // マウス移動のスクリプトはカメラの奪い合いが発生するので自分のだけ処理 mouseLooker.StartM(); humanGrabing.StartM(); } Resources.UnloadUnusedAssets(); camTr = Camera.main.transform; nameLabelTr = transform.Find("NameLabel"); nameLabelTr.GetComponent <TextMesh>().text = photonView.Owner.NickName; }
private void Start() { // いろいろ取得 gorillaMover = GetComponent <GorillaMover>(); mouseLooker = GetComponent <MouseLooker>(); gorillaAnimator = GetComponent <GorillaAnimator>(); humanGrabing = GetComponent <HumanGrabing>(); // 移動のスタート関数 gorillaMover.StartM(); if (photonView.IsMine) { // マウス移動のスクリプトはカメラの奪い合いが発生するので自分のだけ処理 mouseLooker.StartM(); } Resources.UnloadUnusedAssets(); camTr = Camera.main.transform; nameLabelTr = transform.Find("NameLabel"); nameLabelTr.GetComponent <TextMesh>().text = photonView.Owner.NickName; if (photonView.Owner.CustomProperties[Hashes.TeamColor] is int teamColor) { SetTeam((TeamColor)teamColor); } if (photonView.Owner.CustomProperties[Hashes.ID] is int id) { this.id = id; } AttackCollider mineAttackCollider = attackColliderObj.GetComponent <AttackCollider>(); mineAttackCollider.actorNumber = photonView.OwnerActorNr; mineAttackCollider.teamColor = this.teamColor; mineAttackCollider.attackerTransform = transform; attackColliderObj.SetActive(false); if (PhotonNetwork.IsMasterClient) { GameObject.FindWithTag(Tags.GameManager).GetComponent <MyGameManager>().UpdateHumanCount(this.teamColor); } }