예제 #1
0
 private void Start()
 {
     playerShootSource = GetComponent <AudioSource>();
     gameCamera        = gameCamera == null ? Camera.main : gameCamera;
     isReloaded        = true;
     recorder          = GetComponent <PlayerRecorder>();
     movement          = GetComponent <PlayerMovement>();
     animator          = GetComponent <Animator>();
 }
예제 #2
0
    private void Awake()
    {
        if (Instance != null)
        {
            Destroy(gameObject);
            return;
        }
        Instance = this;
        DontDestroyOnLoad(gameObject);

        recorder = GetComponent <PlayerRecorder>();
    }
예제 #3
0
    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;
    }
예제 #4
0
 public PlayerShip(PlayerRecorder playerRecorder, PlayerController playerController, Rigidbody2D rigidbody2D)
 {
     this.playerRecorder   = playerRecorder;
     this.playerController = playerController;
     this.rigidbody2D      = rigidbody2D;
 }