private void Start() { playerShootSource = GetComponent <AudioSource>(); gameCamera = gameCamera == null ? Camera.main : gameCamera; isReloaded = true; recorder = GetComponent <PlayerRecorder>(); movement = GetComponent <PlayerMovement>(); animator = GetComponent <Animator>(); }
private void Awake() { if (Instance != null) { Destroy(gameObject); return; } Instance = this; DontDestroyOnLoad(gameObject); recorder = GetComponent <PlayerRecorder>(); }
private IEnumerator Record(PlayerRecorder playerRecorder, PlayerController playerController) { _controller.PlayBackOtherDuplicatePlayerInteracts(this); playerRecorder.enabled = true; playerRecorder.StartRecording(); playerController.StartCloneControl(_controller); yield return(new WaitForSeconds(_duration)); playerController.StopCloneControl(); _recordings = playerRecorder.StopRecording(); playerRecorder.enabled = false; }
public PlayerShip(PlayerRecorder playerRecorder, PlayerController playerController, Rigidbody2D rigidbody2D) { this.playerRecorder = playerRecorder; this.playerController = playerController; this.rigidbody2D = rigidbody2D; }