private void FindPlayerParts() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <LateralMovement>(); playerRenderer = player.getSprite(); frogAnim = playerRenderer.GetComponent <AnimateFrog>(); jumpControl = player.GetComponent <JumpControl>(); FindPlayerColliders(); hand = transform.parent.gameObject; mouseAimer = hand.GetComponent <AimAtMouse>(); body = GameObject.FindGameObjectWithTag("Player").GetComponent <Rigidbody2D>(); }
private void FindPlayerParts() { jump = GetComponent <JumpControl>(); characterSprite = GetComponentInChildren <SpriteRenderer>().gameObject; frogAnim = characterSprite.GetComponent <AnimateFrog>(); hand = characterSprite.GetComponentInChildren <AimAtMouse>().gameObject; hookshotControl = hand.GetComponentInChildren <HookshotControl>(); wallSensorRight = GameObject.Find("WallSensorR").GetComponent <WallSensor>(); wallSensorLeft = GameObject.Find("WallSensorL").GetComponent <WallSensor>(); ceilingSensor = GameObject.Find("CeilingSensor").GetComponent <CeilingSensor>(); relative = GameObject.Find("GroundColliders").GetComponent <RelativeVelocity>(); }
private void FindPlayerParts() { player = GameObject.FindGameObjectWithTag("Player").GetComponent<LateralMovement>(); playerRenderer = player.getSprite(); frogAnim = playerRenderer.GetComponent<AnimateFrog>(); jumpControl = player.GetComponent<JumpControl>(); FindPlayerColliders(); hand = transform.parent.gameObject; mouseAimer = hand.GetComponent<AimAtMouse>(); body = GameObject.FindGameObjectWithTag("Player").GetComponent<Rigidbody2D>(); }
private void FindPlayerParts() { jump = GetComponent<JumpControl>(); characterSprite = GetComponentInChildren<SpriteRenderer>().gameObject; frogAnim = characterSprite.GetComponent<AnimateFrog>(); hand = characterSprite.GetComponentInChildren<AimAtMouse>().gameObject; hookshotControl = hand.GetComponentInChildren<HookshotControl>(); wallSensorRight = GameObject.Find("WallSensorR").GetComponent<WallSensor>(); wallSensorLeft = GameObject.Find("WallSensorL").GetComponent<WallSensor>(); ceilingSensor = GameObject.Find("CeilingSensor").GetComponent<CeilingSensor>(); relative = GameObject.Find("GroundColliders").GetComponent<RelativeVelocity>(); }