示例#1
0
 private void Initialize()
 {
     originCameraTransform = Camera.main.transform;
     originCameraSize      = Camera.main.orthographicSize;
     zoomOffset            = 3.0f;
     isTouchnigWith        = GetComponent <IsTouchnigWith>();
     constPositionClamp    = GetComponent <ConstPositionClamp>();
 }
示例#2
0
    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コルーチン終了")
            );
    }