private void Awake() { slingShotLine = GameObject.Find("SlingShot").GetComponent <SlingShotLine>(); rb = GetComponent <Rigidbody2D>(); sj = GetComponent <SpringJoint2D>(); sj.connectedBody = GameObject.Find("CentrePoint").GetComponent <Rigidbody2D>(); slingRb = sj.connectedBody; }
private void Awake() { spriteRenderer = GetComponent <SpriteRenderer>(); gameManager = GameObject.Find("GameManager").GetComponent <GameManager>(); slingShotLine = GameObject.Find("SlingshotFront").GetComponent <SlingShotLine>(); sj = GetComponent <SpringJoint2D>(); sj.connectedBody = GameObject.Find("CentrePoint").GetComponent <Rigidbody2D>(); cameraMovement = GameObject.Find("Main Camera").GetComponent <CameraMovement>(); backGroundParallax = GameObject.Find("Background").GetComponent <BackgroundParallax>(); slingRb = sj.connectedBody; }
private void Awake() { Object.DontDestroyOnLoad(base.gameObject); slingShotLine = GameObject.Find("SlingshotFront").GetComponent <SlingShotLine>(); spawnLocation = GameObject.Find("CentrePoint").GetComponent <Transform>(); }