void Awake() { btnReady = GetComponent <Button>(); gameStateManager = GameObject.Find("GameStateManager").GetComponent <GameStateManager>(); setupNavigator = GameObject.Find("SetupNavigator").GetComponent <SetupNavigator>(); arrShip[0] = GameObject.Find("Mary Celeste"); arrShip[1] = GameObject.Find("MV Joyita"); arrShip[2] = GameObject.Find("The Kaz"); arrShip[3] = GameObject.Find("Octavius"); arrShip[4] = GameObject.Find("Carol Deering"); }
// -------------------------- Setup Ship ---------------------------- internal void SendReadyToPlay(string battleMap) { List <KeyValuePair <string, string> > cont = new List <KeyValuePair <string, string> >(); cont.Add(new KeyValuePair <string, string>("sender", playerName)); cont.Add(new KeyValuePair <string, string>("tableSize", tableSize.ToString())); cont.Add(new KeyValuePair <string, string>("gameStateManagerId", gameStateManagerId.ToString())); cont.Add(new KeyValuePair <string, string>("battleMap", battleMap.ToString())); string request = GenerateClientRequest("ReadyToPlay", cont); SendRequest(request); //init setupNavigator here since the object is only accessable on the current scene setupNavigator = GameObject.Find("SetupNavigator").GetComponent <SetupNavigator>(); Thread t = new Thread(ResponseReadyToPlay); t.Start(); }
void Awake() { gridLayout = GameObject.Find("Grid System Opponent").GetComponent <OppoGridLayout>(); setupNavigator = GameObject.Find("SetupNavigator").GetComponent <SetupNavigator>(); }