Пример #1
0
 /* Sets the positon of the camera to Far  */
 public void SetCamFar()
 {
     LevelController.Instance.smartCam.EndOverride();
     LevelController.CameraMoveParams camParamsFar = new LevelController.CameraMoveParams();
     camParamsFar.speed       = 160;
     camParamsFar.destination = farPos.transform.position;
     camParamsFar.rotation    = farPos.transform.rotation;
     LevelController.Instance.StartCoroutine("MoveCamera", camParamsFar);
 }
Пример #2
0
 /* Sets the position of the camera to Close */
 public void SetCamClose()
 {
     LevelController.Instance.smartCam.EndOverride();
     LevelController.CameraMoveParams camParamsClose = new LevelController.CameraMoveParams();
     camParamsClose.speed       = 160;
     camParamsClose.destination = closePos.position;
     camParamsClose.rotation    = closePos.rotation;
     LevelController.Instance.StartCoroutine("MoveCamera", camParamsClose);
 }
Пример #3
0
    /*
     * Starts the player's turn sequence. The player can do the following things
     * during their turn:
     *
     * 1) move the tank
     * 2) change the angle
     * 3) choose a weapon to shoot
     * 4) shoot the enemy
     *
     * Moving or shooting will use up your turn
     * Changing the angle does NOT count as a use of your turn
     */
    public void StartTurn()
    {
        // move the main camera to the tank's camera view location
        LevelController.CameraMoveParams camParams = new LevelController.CameraMoveParams();
        camParams.speed       = 160;
        camParams.destination = closePos.transform.position;
        camParams.rotation    = closePos.transform.rotation;
        LevelController.Instance.StartCoroutine("MoveCamera", camParams);

        // dispay the turn UI
        tankUI.SetActive(true);
    }