private void Start() { this._targetRPC = PhotonManager.Instance.GetComponent<PhotonView>(); this._photonView = this.GetComponent<PhotonView>(); this._rowController = this.GetComponent<RowTiltController>(); this._paddleSoundController = this.GetComponent<PaddleSoundController> (); this.transform.GetChild(0).gameObject.SetActive(!PhotonNetwork.isMasterClient); this.transform.SetParent(GameObject.Find("Boat_Mobile_Roeien(Clone)").transform); this._rowController.Row += (sender, args) => { if (args.Side == this.Side) this.Roei(args.Strength * args.Efficiency); }; }
// Use this for initialization private void Start() { this._rb = this.GetComponent<Rigidbody>(); this._rowController = this.GetComponent<RowTiltController>(); if (this._rowController != null) { Debug.Log("Added row controls!"); this._rowController.Row += (sender, args) => { //if (args.Side != RowTiltController.RowSide.Left) return; this.AddForce(this._achter.position, args.Strength * args.Efficiency); }; } if (!PhotonNetwork.isMasterClient) { PhotonManager.Instance.Boot = this; } }