void Start() { this.ballInteraction = GetComponent<BallInteraction>(); this.rb = GetComponent<Rigidbody>(); this.normalMovement = GetComponent<NormalMovement>(); this.cylinderMovement = GetComponent<CylinderMovement>(); }
void Awake() { GameObject charSprite = transform.GetChild(0).FindChild("Character Sprite").gameObject; rb = GetComponent<Rigidbody>(); anim = charSprite.GetComponent<Animator>(); ballInteraction = GetComponent<BallInteraction>(); }
void Start() { this.player = GetComponent<PlayerController>(); this.soundController = GetComponent<SoundController>(); this.ballTransform = GameObject.FindWithTag("Ball").transform; this.ballInteraction = GetComponent<BallInteraction>(); this.cameraController = Camera.main.GetComponent<CameraController>(); GameObject charSprite = transform.GetChild(0).FindChild("Character Sprite").gameObject; anim = charSprite.GetComponent<Animator>(); }