Exemplo n.º 1
0
    void Start()
    {
        Player      = GameObject.Find("Player").GetComponentInChildren <PlayerTrapControl>();
        PlayerRb    = GameObject.Find("Player").GetComponentInChildren <Rigidbody2D>();
        QTEPanel    = GameObject.Find("Canvas").transform.Find("QTE Hint").gameObject;
        AudioPlayer = GetComponent <AudioSource>();
        Transform PMs = GameObject.Find("PMs").transform;

        PMRbs = new Rigidbody2D[PMs.childCount];
        for (int i = 0; i < PMs.childCount; ++i)
        {
            PMRbs[i] = PMs.GetChild(i).GetComponent <Rigidbody2D>();
        }
    }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     Player       = GameObject.Find("Player").GetComponentInChildren <PlayerTrapControl>();
     LevelControl = GameObject.Find("LevelControl").GetComponent <ChongqingLevelControl>();
 }