Exemple #1
0
    private void Rotate(bool left)
    {
        Vector3 actualRotation = transform.localRotation.eulerAngles;
        Vector3 vector         = left ? Vector3.forward : Vector3.back;

        actualRotation         += vector * MovementVariables.GetInstance().Rotation;
        transform.localRotation = Quaternion.Euler(actualRotation);
    }
Exemple #2
0
 private void MovementDown()
 {
     if (m_fast)
     {
         m_pieceManager.SetVelocityDown(MovementVariables.GetInstance().ForceFast);
     }
     else
     {
         m_pieceManager.SetVelocityDown(MovementVariables.GetInstance().ForceNormal);
     }
 }
Exemple #3
0
 private void MovementLateral()
 {
     if (!m_right && !m_left)
     {
         m_pieceManager.SetVelocitiyLateral(0);
         return;
     }
     if (m_right)
     {
         m_pieceManager.SetVelocitiyLateral(MovementVariables.GetInstance().ForceLateral);
     }
     if (m_left)
     {
         m_pieceManager.SetVelocitiyLateral(-MovementVariables.GetInstance().ForceLateral);
     }
 }