Beispiel #1
0
    // 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");
        }
    }
Beispiel #2
0
 // 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();
 }
Beispiel #3
0
 private void Start()
 {
     gm    = GetComponent <GameManager>();
     audio = GetComponent <AudioSource>();
     ins   = FindObjectOfType <CardInspector>();
 }