Exemplo n.º 1
0
 void Awake()
 {
     recordGroup = GetComponent<PrizmRecordGroup>();
     gameManager = GetComponent<GameManager_TT> ();
     tabletopInit = GetComponent<TabletopInitialization> ();
 }
Exemplo n.º 2
0
 public void Awake()
 {
     associates         = new List <PrizmRecord> ();
     tabletopInitObject = GetComponent <TabletopInitialization> ();
 }
Exemplo n.º 3
0
 //meteor connection code needs to be the first to run and connect to database (all further actions depend on finishing this initialization)
 void Awake()
 {
     deviceID    = SystemInfo.deviceUniqueIdentifier;        //assign device UID for server
     gameManager = GetComponent <GameManager> ();
     Instance    = this;
 }
Exemplo n.º 4
0
 void Awake()
 {
     recordGroup  = GetComponent <PrizmRecordGroup>();
     gameManager  = GetComponent <GameManager> ();
     tabletopInit = GetComponent <TabletopInitialization> ();
 }
Exemplo n.º 5
0
    //called on when a player record is added
    public void CreateNewPlayer(PlayerSchema playerToCreate)
    {
        createMsgLog(playerToCreate.name + " has joined the game!");

        //instantiate player prefab
        GameObject newPlayer = Instantiate(playerPrefab) as GameObject;

        newPlayer.GetComponent <Player> ().record.mongoDocument = playerToCreate;
        newPlayer.GetComponent <Player> ().initializePlayer(playerToCreate.name, playerToCreate.faction, playerToCreate._id);

        newPlayer.transform.SetParent(playerManagerObject.transform);
        playerList.Add(newPlayer);



        numPlayersJoined++;
        if (numPlayersJoined >= numPlayers)
        {
            //disable record handler


            AdvanceGameState();
            createMsgLog(" ");
            waitingForText.SetActive(false);
        }
        else
        {
            waitingForText.GetComponent <Text> ().text = "Waiting for " + (numPlayers - numPlayersJoined).ToString() + " more players to join\nJoin IP Address:'" + TabletopInitialization.GetIP() + ":6969'";
        }
    }
Exemplo n.º 6
0
    void InitializeGameManager()
    {
        playerManagerObject = GameObject.Find("PlayerManager");

        msgCanvas       = GameObject.Find("MsgCanvas");
        mainCamera      = GameObject.Find("MainCamera").GetComponent <Camera> ();
        mainAudioSource = GetComponent <AudioSource> ();

        waitingForText = GameObject.Find("WaitingFor");

        starsMaster  = GameObject.Find("Stars");
        bigBangStars = starsMaster.transform.FindChild("BigBang").gameObject;
        actionStars  = GameObject.Find("ActionStars");
        intro3DText  = GameObject.Find("Intro3DText");

        foreach (Transform child in starsMaster.transform)
        {
            child.gameObject.SetActive(false);
        }
        starsMaster.SetActive(false);
        actionStars.SetActive(false);

        waitingForText.GetComponent <Text> ().text = "Waiting for " + (numPlayers - numPlayersJoined).ToString() + " more players to join\nJoin IP Address:'" + TabletopInitialization.GetIP() + ":6969'";

        CreateBoundariesDice();
        CreateBoundariesShip();
    }
 public void Awake()
 {
     associates = new List<PrizmRecord> ();
     tableTopInitObject = GetComponent<TabletopInitialization> ();
 }