Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        pourcentile = GetComponent <pourcentage>();
        objG        = GameObject.Find("Player").GetComponent <ObjectGravity>();
        spotlight   = GameObject.Find("Player").GetComponentsInChildren <Light>().First(x => x.name == "Spot Light");

        cnv         = GetComponentsInChildren <Canvas>().First(x => x.name == "EndGame");
        cnv.enabled = false;
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     objGrav = GetComponent <ObjectGravity>();
     color   = gameObject.GetComponent <SpriteRenderer>().color;
 }