예제 #1
0
    private void FixedUpdate()
    {
        //move the player with the correct recored values
        player.Move(X, m_Jump);
        player.Dash(m_Dash);


        //pause or unpause the game
        //TODO implement the pause into replay
        // menu.paused = m_Pause;

        //check if XPos and YPos are NOT ZERO
        //if so, make a correction
        if (XPos != 0 || YPos != 0)
        {
            player.m_Rigidbody2D.velocity = Vector2.zero;
            player.Correction(targetPos, X);
            updatePos();
        }


        m_Jump = false;
        m_Dash = false;

        //if x seconds have passed
        ////then get the current player position and write it to a file
        //if (Time.time > nextActionTime)
        //{
        //    nextActionTime += peroid;
        //    StartCoroutine(Sync());
        //}
    }