Example #1
0
 public void CmdEndTurn()
 {
     if (GameManagerV2.IsTurn(playerId))
     {
         GameManagerV2.NextPlayer();
     }
 }
Example #2
0
 private void CmdMovePanel()
 {
     GameManagerV2.MovePanel(speed);
     //Vector2 temp = GameManagerV2.single.panel.transform.position;
     //temp.x += speed * Time.deltaTime;
     //GameManagerV2.single.panel.transform.position = temp;
 }
    // Use this for initialization
    void Start()
    {
        gm = FindObjectOfType <GameManagerV2>();

        Transform temp = Instantiate(tiles[Random.Range(0, tiles.Count)], new Vector3(coordinates.x - 4.5f, coordinates.y - 3, 0), tiles[0].rotation);

        temp.parent = transform;

        tileContained = transform.GetChild(0);
    }
Example #4
0
 private void Update()
 {
     if (isLocalPlayer)
     {
         if (MovePanelBool && GameManagerV2.IsTurn(player.playerId))
         {
             CmdMovePanel();
         }
     }
 }
Example #5
0
    // ScoreManager scoreManager;

    private void Awake()
    {
        // Sets the gameManager into a "GameManager.cs" script
        gameManagerV2 = GameObject.Find("Game Manager v2").GetComponent <GameManagerV2>();

        // Sets the spawnManager into a "SpawnManager.cs" script
        // spawnManager = GameObject.Find("Spawn Manager").GetComponent<SpawnManager>();

        // Sets the scoreManager variable to "ScoreManager.cs" component
        // scoreManager = GameObject.Find("Score Manager").GetComponent<ScoreManager>();
    }
Example #6
0
    public IEnumerator DelayAddToGame()
    {
        yield return(new WaitForSeconds(0.25f));

        if (isServer)
        {
            GameManagerV2.AddPlayer(this);
            CmdEndTurn();
        }

        if (isLocalPlayer)
        {
            transform.GetChild(0).gameObject.SetActive(true);
            //ui = transform.GetChild(0).GetComponent<PlayerUI>();
        }
    }
Example #7
0
 // Use this for initialization
 void Start()
 {
     gm = FindObjectOfType <GameManagerV2>();
     em = FindObjectOfType <EventManager>();
 }
Example #8
0
 private void Start()
 {
     gm = FindObjectOfType <GameManagerV2>();
 }
Example #9
0
 private void Awake()
 {
     single = this;
 }
Example #10
0
 private void CmdMovePanel()
 {
     GameManagerV2.MovePanel(speed);
 }
Example #11
0
 private void CmdCheckMyTurn()
 {
     myTurn = GameManagerV2.IsTurn(playerId);
 }
Example #12
0
 // Start is called before the first frame update
 void Start()
 {
     // Sets the gameManager into a "GameManager.cs" script
     gameManager = GameObject.Find("Game Manager").GetComponent <GameManagerV2>();
 }