void Start() { if (hasAuthority) { GodCamera = GameObject.FindGameObjectWithTag("GodCamera").GetComponent<Camera>(); floorMask = LayerMask.GetMask("Floor"); } if (isServer) { resourcesUI = GameObject.FindGameObjectWithTag("AvatarPoolManager").GetComponent<gvmGodRessourcesManager>(); } for (int i = 0; i < AOEContainer.Length; i++) { AOEContainer[i].name = gameObject.name + i; AOEContainer[i].transform.parent = null; AOEContainer[i].GetComponent<gvmSpellCollider>().Init(SpellData); } gameObject.SetActive(false); }
void Start() { if (hasAuthority) { GodCamera = GameObject.FindGameObjectWithTag("GodCamera").GetComponent<Camera>(); floorMask = LayerMask.GetMask("Floor"); } if (isServer) { resourcesUI = GameObject.FindGameObjectWithTag("AvatarPoolManager").GetComponent<gvmGodRessourcesManager>(); } spellCollider.GetComponent<gvmSpellCollider>().Init(gameObject.GetComponent<gvmUIDataContainer>()); castTime = new WaitForSeconds(gameObject.GetComponent<gvmUIDataContainer>().castTime); gameObject.SetActive(false); }