// Use this for initialization void Start () { _instance = this; //address = "https://navalapi.rozumgames.com/"; address = "http://www.naval-battle2.somee.com/"; //address = "http://localhost:58885/"; transform.FindChild ("Dialog_yes_no").gameObject.SetActive (false); transform.FindChild ("Dialog_yes_no_fake").gameObject.SetActive (false); transform.FindChild("stop_btn").GetComponent<Button>().onClick.AddListener(StopClick); transform.FindChild("start_btn").GetComponent<Button>().onClick.AddListener(SendRequest); transform.FindChild("back_btn").GetComponent<Button>().onClick.AddListener(BackClick); transform.FindChild("search_btn").GetComponent<Button> ().onClick.AddListener (Search); selected_map_index = 0; selected_map = maps[selected_map_index]; transform.FindChild("map").FindChild("left_btn").GetComponent<Button>().onClick.AddListener(SetPreviousMap); transform.FindChild("map").FindChild("right_btn").GetComponent<Button>().onClick.AddListener(SetNextMap); //transform.FindChild ("info_btn").GetComponent<Button> ().onClick.AddListener (OpenInfo); transform.FindChild ("Item_description").GetComponent<Button> ().onClick.AddListener (CloseInfo); transform.FindChild("background").GetComponent<Button> ().onClick.AddListener (Untarget); transform.FindChild("WaitingPlayersBackground").FindChild("WaitingPlayers").GetComponent<Button> ().onClick.AddListener (Untarget); isShip = true; //ToggleSide(); transform.FindChild("ship_btn").GetComponent<Button>().onClick.AddListener(delegate { isShip = true; SoundScript.Instance.PlaySound(SoundTitle.btn_click_snd); ToggleSide(); }); transform.FindChild ("submarine_off").GetComponent<Button> ().onClick.AddListener (HideSubmarineBanned); // transform.FindChild("u_ship_slot1_blocker").GetComponent<Button>().onClick.AddListener(OpenShop); // transform.FindChild("u_ship_slot2_blocker").GetComponent<Button>().onClick.AddListener(OpenShop); // transform.FindChild("u_ship_slot3_blocker").GetComponent<Button>().onClick.AddListener(OpenShop); // transform.FindChild("u_submarine_slot1_blocker").GetComponent<Button>().onClick.AddListener(OpenShop); // transform.FindChild("u_submarine_slot2_blocker").GetComponent<Button>().onClick.AddListener(OpenShop); //transform.FindChild("u_submarine_slot3_blocker").GetComponent<Button>().onClick.AddListener(OpenShop); instantRefresh = false; isStarting = false; waitingTime = null; transform.FindChild ("Dialog_yes_no").FindChild ("Yes_btn").GetComponent<Button> ().onClick.AddListener (delegate { SoundScript.Instance.PlaySound(SoundTitle.btn_click_snd); SayAnswer ("yes");}); transform.FindChild ("Dialog_yes_no").FindChild ("No_btn").GetComponent<Button> ().onClick.AddListener (delegate { SoundScript.Instance.PlaySound(SoundTitle.btn_click_snd); SayAnswer ("no");}); transform.FindChild ("Dialog_yes_no_fake").FindChild ("Yes_btn").GetComponent<Button> ().onClick.AddListener (delegate { SoundScript.Instance.PlaySound(SoundTitle.btn_click_snd); SayAnswer_fake ("yes");}); transform.FindChild ("Dialog_yes_no_fake").FindChild ("No_btn").GetComponent<Button> ().onClick.AddListener (delegate { SoundScript.Instance.PlaySound(SoundTitle.btn_click_snd); SayAnswer_fake ("no");}); WaitingWindowSetActive (false); ingameTime = DateTime.Now; GetRandomBots (); }
// Variables end____________________________ // Use this for initialization void Start() { if (networkView.isMine == true) { multiplayerManager = GameObject.Find("MultiplayerManager"); multiScript = multiplayerManager.GetComponent <MultiplayerScript>(); } else { enabled = false; } }
// Variables end____________________________ // Use this for initialization void Start() { if(networkView.isMine == true) { multiplayerManager = GameObject.Find("MultiplayerManager"); multiScript = multiplayerManager.GetComponent<MultiplayerScript>(); } else { enabled = false; } }
// Use this for initialization void Start() { if(networkView.isMine == true) { multiplayerManager = GameObject.Find ("MultiplayerManager"); myScript = multiplayerManager.GetComponent<MultiplayerScript>(); gameManager = GameObject.Find ("GameManager"); commScript = gameManager.GetComponent<CommunicationWindow>(); scoreScript = gameManager.GetComponent<ScoreTable>(); } else {enabled = false;} }
// Use this for initialization void Start() { spawn = GameObject.Find("SpawnManager").GetComponent <SpawnScript>(); multiplayerScript = GameObject.Find("MultiplayerManager").GetComponent <MultiplayerScript>(); source = gameObject.GetComponent <AudioSource>(); }