Exemplo n.º 1
0
 public CameraMovementRestrictions()
 {
     xAxis = eAxisRestriction.AxisRestrictionNone;
     yAxis = eAxisRestriction.AxisRestrictionNone;
     zAxis = eAxisRestriction.AxisRestrictionNone;
 }
 private void DetermineRestriction(float viewport, eCameraBoundEntryAxis entryVector, ref eAxisRestriction restriction)
 {
     if (((viewport > 0.5F) &&
         ((entryVector == eCameraBoundEntryAxis.CameraBoundEntryNegative) || (entryVector == eCameraBoundEntryAxis.CameraBoundEntryBoth))) ||
         ((viewport < 0.5F) &&
         ((entryVector == eCameraBoundEntryAxis.CameraBoundEntryPositive) || (entryVector == eCameraBoundEntryAxis.CameraBoundEntryBoth))))
     {
         if (entryVector == eCameraBoundEntryAxis.CameraBoundEntryBoth)
         {
             restriction = eAxisRestriction.AxisRestrictionBoth;
         }
         else if (entryVector == eCameraBoundEntryAxis.CameraBoundEntryNegative)
         {
             restriction = eAxisRestriction.AxisRestrictionPositive;
         }
         else if (entryVector == eCameraBoundEntryAxis.CameraBoundEntryPositive)
         {
             restriction = eAxisRestriction.AxisRestrictionNegative;
         }
     }
 }