Ejemplo n.º 1
0
    void Awake()
    {
        rb            = GetComponent <Rigidbody> ();
        renderer      = GetComponent <Renderer>();
        trail         = GetComponent <TrailRenderer> ();
        trail.enabled = false;

        am  = GameObject.Find("AudioManager").GetComponent <AudioManager> ();
        gm  = GameObject.Find("GameManager").GetComponent <GameManager> ();
        aam = gm.GetComponent <AimAssistManager> ();
        ebm = gm.GetComponent <EnemyBallManager> ();

//		player = GameObject.Find ("Player");
    }
Ejemplo n.º 2
0
    void Awake()
    {
        //rbs = gameObject.GetComponentsInChildren<Rigidbody>(); <-- doesn't work

        foreach (Rigidbody rb in rbs)
        {
            //rb.mass *= 8;
            rb.useGravity  = false;
            rb.isKinematic = true;
        }

        gameMan  = GameObject.Find("GameManager").GetComponent <GameManager>();
        audioMan = GameObject.Find("AudioManager").GetComponent <AudioManager>();
        aam      = gameMan.gameObject.GetComponent <AimAssistManager> ();
        ebm      = gameMan.gameObject.GetComponent <EnemyBallManager> ();

        floor            = GameObject.Find("Floor").GetComponent <SpawnFloor> ();
        player           = GameObject.Find("Player");
        playerPos        = player.transform.position;
        throwDestination = GameObject.Find("ThrowDestination").transform;
    }