void _Initialize() { anim = GetComponent <Animator>(); rigid = GetComponent <Rigidbody2D>(); audioSource = GetComponent <AudioSource>(); ground = transform.Find("ground"); feet = transform.Find("footstep"); footStepAudioPlayer = transform.Find("footstep").gameObject.GetComponent <FootStepAudioPlayer>(); cameraFollow = Camera.main.GetComponent <CameraFolllow>(); newScale = transform.localScale; worldWrappingControl = GetComponent <WorldWrappingController>(); render = GetComponent <SpriteRenderer>(); isControlable = true; platformAttacher = GetComponent <PlatformAttacher>(); }
void Awake() { rigid = GetComponent <Rigidbody2D>(); focusEffector = GetComponent <FocusEffector>(); platformAttacher = GetComponent <PlatformAttacher>(); }