Esempio n. 1
0
    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>();
    }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     gamemanager_script = gamemanager.GetComponent <gamemanagerscript>();
 }