private void Start()
    {
        for (int i = 0; i < 2; i++)
        {
            p[0]      = GameObject.FindGameObjectWithTag("Player");
            p[1]      = GameObject.FindGameObjectWithTag("Player2");
            pDeath[0] = p[0].GetComponent <P_Death>();
            pDeath[1] = p[1].GetComponent <P_Death>();
        }

        playerVent     = GetComponent <P_Vent>();
        playerControl  = GetComponent <P_controls>();
        playerPushPull = GetComponent <P_pushPull>();
        playerThrow    = GetComponent <P_throw>();
        leverInteract  = GetComponent <P_mechanismTrigger>();
        playerVelocity = GetComponent <Rigidbody2D>();
    }
示例#2
0
 private void Start()
 {
     pThrow = GetComponent <P_throw>();
 }