Пример #1
0
 public void ActivatePieceSnapping()
 {
     GameCamera.transform.position = CameraStartingPosition.position;
     cameraControl.LookAtPoint     = CameraLookAt;
     cameraControl.Distance        = 1.5f;
     cameraControl.ChangeAngle(0f, 0f);
     cameraControl.EnableZoom = true;
     PieceSnapping.enabled    = true;
 }
Пример #2
0
    public void SetupForCutting()
    {
        currentSpawnPoint = FromSawSpawnPoint;
        if (previousAction == ActionState.None || previousAction == ActionState.UsingRuler || currentAction == ActionState.UsingRuler)
        {
            AvailableWoodMaterial[currentPieceIndex].transform.rotation = Quaternion.Euler(0.0f, 90.0f, 0.0f);
            PlacePiece();

            orbitCamera.EnableZoom  = true;
            orbitCamera.EnableOrbit = true;
            orbitCamera.LookAtPoint = CameraSawLookAtPoint;
            orbitCamera.ChangeAngle(0.0f, 45.0f);
            orbitCamera.ChangeDistanceConstraints(1.5f, 0.5f, 5.0f);
        }
        SawBlade.TurnOff();
        SawBlade.BladeCollider.convex = true;
        EnableCurrentBoardMovement(true);
        RestrictCurrentBoardMovement(false, false);
        SwitchAction(ActionState.OnSaw);
        UI_Manager.ChangeSawButtons(false);
        GameRuler.SetActive(false);
        CutGameplay.enabled   = true;
        BladeControl.Moveable = false;
    }
Пример #3
0
 public void SetupForCutting()
 {
     currentSpawnPoint = FromSawSpawnPoint;
     if (previousAction == ActionState.None || previousAction == ActionState.UsingRuler || currentAction == ActionState.UsingRuler)
     {
         AvailableWoodMaterial[currentPieceIndex].transform.rotation = Quaternion.identity;
         PlacePiece();
         orbitCamera.enabled = true;
         panCamera.enabled   = false;
         orbitCamera.ChangeAngle(0f, 50f);
         orbitCamera.Distance = 1.5f;
     }
     SawBlade.TurnOff();
     EnableCurrentBoardMovement(true);
     RestrictCurrentBoardMovement(false, false);
     SwitchAction(ActionState.OnSaw);
     UI_Manager.ChangeSawButtons(false);
     UI_Manager.DisplaySawButtons();
     GameRuler.gameObject.SetActive(false);
     CutGameplay.enabled = true;
 }