private void Start() { isHoldingNumber = 999; //Just for check true without bool thisRigidBody = GetComponent <Rigidbody2D>(); holdingRigidBody = thisRigidBody; _ropeGenerator = GameObject.Find("RopeGenerator").GetComponent <RopeGenerator>(); cameraXDis = Camera.main.orthographicSize / 9 * 16; _playerAnimations = transform.Find("PlayerSprite").GetComponent <PlayerAnimations>(); _gameController = GameObject.Find("GameController").GetComponent <GameController>(); thisRigidBody.velocity += Vector2.right * initialVelocity; canvasInGame = GameObject.Find("CanvasInGame"); _gameVars = GameObject.Find("GameController").GetComponent <GameVars>(); initVelocityMod = velocityMod; _soundEmmiter = Camera.main.transform.Find("Sounds").GetComponent <SoundEmmiter>(); }
private void Start() { _hand = transform.parent.GetComponent <Hand>(); _gameVars = GameObject.Find("GameController").GetComponent <GameVars>(); _soundEmmiter = Camera.main.transform.Find("Sounds").GetComponent <SoundEmmiter>(); }