5. Staab, J. P., (2000). «Diagnosis and treatment of psychologic symptoms and psychiatric disorders in patients with dizziness and imbalance. Rochester : Otolaryngol. Clin. North Am»
6. Balaban, C., Furman, J., Staab, J., (2013). «Threat Assessment and Locomotion: Clinical Applications of an Integrated Model of Anxiety and Postural Control. Rochester: Seminars in Neurology»
7. Edelman, S., Mahoney, A. E. J., Cremer, P. D., (2012). «Cognitive behavior therapy for chronic subjective dizziness: a randomized, controlled trial. New York: American Journal of Otolaryngology»
8. Staab, J. P., (2006). «Chronic dizziness: The interface between psychiatry and neurootology. Rochester: Current Opinion in Neurology»
Приложение
Внутренний скрипт движения воды
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Water_Moving_Back : MonoBehaviour {
// Use this for initialization
void Start () {
}
IEnumerator Water()
{
for (int i = 0; i<1000; i++)
{
transform.Translate(Vector3.forward/100);
yield return new WaitForSeconds(1);
transform.Translate(Vector3.back/100);
}
}
// Update is called once per frame
void Update () {
StartCoroutine(Water());
}
}
Внешний скрипт движения воды
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Water_Returning : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (transform.position.z > 350)
{
transform.Translate(Vector3.down*360);
}
}
}
Движение лодки (включая качку)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Boat_Move : MonoBehaviour {
public int time_spent;
// Use this for initialization
void Start () {
time_spent = 0;
}
// Update is called once per frame
void Update () {
int speed = MenuButtons.Params.speed;
int speed_water = MenuButtons.Params.speed_water;
int power_water = MenuButtons.Params.power_water;
time_spent++;
if (time_spent == 180*power_water + 1)
{
time_spent = 0;
}
if ((time_spent < 40*power_water + 1) || (time_spent > 140*power_water))
{
//transform.Rotate(Vector3.left/100);
transform.Rotate(Vector3.forward/500*speed_water);
}
if ((time_spent > 50*power_water) && (time_spent < 150*power_water + 1))
{
//transform.Rotate(Vector3.right/100);
transform.Rotate(Vector3.back/500*speed_water);
}
/*if ((time_spent < 51) || ((time_spent > 150) && (time_spent < 201)))
{
//transform.Rotate(Vector3.left/100);
transform.Rotate(Vector3.forward/100);
}
if (((time_spent > 75) && (time_spent < 126)) || ((time_spent > 225) && (time_spent < 276)))
{
//transform.Rotate(Vector3.right/100);
transform.Rotate(Vector3.back/100);
}*/
string control_type = "manual";
//Options - 'manual', 'operator', 'player'
if (control_type == "manual")
{
if (Input.GetKey(KeyCode.W))
{
transform.Translate(Vector3.forward/50*speed);
}
if (Input.GetKey(KeyCode.S))
{
transform.Translate(Vector3.back/500*speed);
}
if (Input.GetKey(KeyCode.A))
{
transform.Rotate(Vector3.down/100*speed);
}
if (Input.GetKey(KeyCode.D))
{
transform.Rotate(Vector3.up/100*speed);
}
}
}
}
Работа с внешним интерфейсом (кнопки)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MenuButtons : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public static class Params
{
public static int speed = 5;
public static int speed_water = 5;
public static int power_water = 5;
}
public void PlayPressed()
{
SceneManager.LoadScene("Boat");
}
public void SpeedPlusPressed()
{
Params.speed++;
}
public void SpeedMinusPressed()
{
if (Params.speed>0) Params.speed--;
}
public void SpeedWaterPlusPressed()
{
Params.speed_water++;
}
public void SpeedWaterMinusPressed()
{
if (Params.speed_water>0) Params.speed_water--;
}
public void PowerWaterPlusPressed()
{
if (Params.power_water<20) Params.power_water++;
}
public void PowerWaterMinusPressed()
{
if (Params.power_water>0) Params.power_water--;
}
}
Работа с внешним интерфейсом (текст)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Speed_Value : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
GetComponent<Text>().text = MenuButtons.Params.speed.ToString() + " км/ч";
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Speed_Water : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
GetComponent<Text>().text = MenuButtons.Params.speed_water.ToString() + " м/с";
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Power_Water : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
GetComponent<Text>().text = (20-MenuButtons.Params.power_water).ToString();
}
}