void Start() { gameObject.layer = 2; //rays go through this gameobject gamemanager_script = (GameObject.Find("gamemanager")).GetComponent <gamemanagerscript>(); materials_color = new Color[GetComponent <Renderer>().materials.Length]; for (int i = 0; i < materials_color.Length; i++) { materials_color[i] = GetComponent <Renderer>().materials[i].color; } collider = GetComponent <BoxCollider>(); gridSystem = FindObjectOfType <GridSystem>(); }
// Start is called before the first frame update void Start() { gamemanager_script = gamemanager.GetComponent <gamemanagerscript>(); }