Ejemplo n.º 1
0
    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");
    }
Ejemplo n.º 2
0
    // -------------------------- 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();
    }
Ejemplo n.º 3
0
 void Awake()
 {
     gridLayout     = GameObject.Find("Grid System Opponent").GetComponent <OppoGridLayout>();
     setupNavigator = GameObject.Find("SetupNavigator").GetComponent <SetupNavigator>();
 }