Example #1
0
 void Start()
 {
     ballCam = Camera.main;
     guiManager = GameObject.Find("Globals").GetComponent("GUIManager") as GUIManager;
     globalVals = GameObject.Find("Globals").GetComponent("GlobalValues") as GlobalValues;
     playerBall = GameObject.Find("Globals").GetComponent("Player_Ball") as Player_Ball;
     pathManager = GameObject.Find("Globals").GetComponent("ConstraintManager") as ConstraintManager;
     graphManager = GameObject.Find("Globals").GetComponent("GraphManager") as GraphManager;
     meta = GameObject.Find("Globals").GetComponent("GameMetaManager") as GameMetaManager;
 }
    void Start()
    {
        GameObject globalObj = GameObject.FindGameObjectWithTag("GlobalTag");

        lineManager = globalObj.GetComponent("ConstraintManager") as ConstraintManager;
        graphManager = globalObj.GetComponent("GraphManager") as GraphManager;
        guiManager = globalObj.GetComponent("GUIManager") as GUIManager;
        globalVals = globalObj.GetComponent("GlobalValues") as GlobalValues;
        ballClass = globalObj.GetComponent("Player_Ball") as Player_Ball;
        endPoint = GameObject.Find("EndPoint");
    }