Ejemplo n.º 1
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;
    }
Ejemplo n.º 2
0
    public void SetupForCutting()
    {
        currentSpawnPoint = FromSawSpawnPoint;
        if (previousAction == ActionState.None || previousAction == ActionState.UsingRuler || currentAction == ActionState.UsingRuler)
        {
            AvailableWoodMaterial[currentPieceIndex].transform.rotation = Quaternion.identity;
            PlacePieceAtSpawnPoint(new Vector3(0.0f, 0.0f, -3.0f));

            orbitCamera.enabled = true;
            panCamera.enabled   = false;
            orbitCamera.ChangeAngle(90.0f, 45.0f);
            orbitCamera.ChangeDistanceConstraints(1.5f, 0.8f, 2.0f);
        }
        SawBlade.TurnOff();
        SawController.EnableMovement(false);
        EnableCurrentBoardMovement(true);
        RestrictCurrentBoardMovement(false, false);
        SwitchAction(ActionState.OnSaw);
        UI_Manager.ChangeSawButtons(false);
        UI_Manager.DisplaySawButtons();
        GameRuler.gameObject.SetActive(false);
        CutGameplay.enabled = true;
    }