This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using Photon; | |
| public class NetworkPlayer : Photon.MonoBehaviour | |
| { | |
| float lerpSmoothing = 5f; | |
| float updateTime = 0f; | |
| private Vector3 correctPlayerPos; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Converted from UnityScript to C# at http://www.M2H.nl/files/js_to_c.php - by Mike Hergaarden | |
| // Do test the code! You usually need to change a few small bits. | |
| using UnityEngine; | |
| public class biker_logic_mecanim : MonoBehaviour | |
| { | |
| /// Writen by Boris Chuprin smokerr@mail.ru | |
| private Animator myAnimator; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Converted from UnityScript to C# at http://www.M2H.nl/files/js_to_c.php - by Mike Hergaarden | |
| // Do test the code! You usually need to change a few small bits. | |
| using UnityEngine; | |
| using System.Collections; | |
| public class biker_logic_mecanim : MonoBehaviour | |
| { | |
| /// Writen by Boris Chuprin smokerr@mail.ru |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Converted from UnityScript to C# at http://www.M2H.nl/files/js_to_c.php - by Mike Hergaarden | |
| // Do test the code! You usually need to change a few small bits. | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class skidMark : MonoBehaviour | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (photonView.isMine) { | |
| myCamera.SetActive (true); | |
| } | |
| else | |
| { | |
| transform.position = Vector3.Lerp(transform.position, correctPlayerPos, Time.deltaTime * updateTime); | |
| transform.rotation = Quaternion.Lerp(transform.rotation, correctPlayerRot, Time.deltaTime * updateTime); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using Photon; | |
| public class NetworkPlayer : PunBehaviour { | |
| private keyboardControls m_bikeInput; | |
| bool isAlive = true; | |
| public GameObject myCamera; | |
| private Rigidbody rb; |