// Start is called before the first frame update void Start() { inp = GetComponent <InputHandler>(); gm = FindObjectOfType <GameManager>(); st = GetComponent <StatHandler>(); if (isServer) { st.initialize(); if (!gm.registerTeam(netId, out teamIndex)) { Debug.LogError("Registraion error"); } else { //initDeck(); RpcAssignTeam(teamIndex); } } if (!isServer) { alignDir(); } if (isLocalPlayer) { Instantiate(cameraPre, transform); StatHandler.Refresh reUI = FindObjectOfType <ResourceUI>().refresh; st.addRefresh(reUI); inspect = FindObjectOfType <CardInspector>(); UIturn = FindObjectOfType <TurnIndicatorUI>(); abilPanel = FindObjectOfType <UnitAbilityUI>(); findClientDeck(); //Debug.Log("Refresh added"); } }
// Start is called before the first frame update void Start() { inspect = FindObjectOfType <CardInspector>(); mainDeckMax.text = GameConstants.mainDeckSize.ToString(); strcDeckMax.text = GameConstants.structureDeckSize.ToString(); createPlayableCards(); //LoadDeck(); }
private void Start() { gm = GetComponent <GameManager>(); audio = GetComponent <AudioSource>(); ins = FindObjectOfType <CardInspector>(); }