private void Initialize() { originCameraTransform = Camera.main.transform; originCameraSize = Camera.main.orthographicSize; zoomOffset = 3.0f; isTouchnigWith = GetComponent <IsTouchnigWith>(); constPositionClamp = GetComponent <ConstPositionClamp>(); }
private void Initialize() { sender = new Subject <Unit>(); thisRigidbody2D = GetComponent <Rigidbody2D>(); IsGroundedScript = GetComponent <IsTouchnigWith>(); thisVelocity = Abs(thisRigidbody2D.velocity.x) + Abs(thisRigidbody2D.velocity.y); originPosX = transform.position.x; Observable.FromCoroutine(MainLoop).First().TakeUntilDestroy(this).Subscribe( _ => Debug.Log("MainLoopコルーチン終了") ); }