public void Shoot(Vector2 dir, float power, CinemachineVirtualCamera cam, CannonHandler cannon) { Debug.Log("°ø ¹ß»ç!"); rigid.AddForce(dir.normalized * power); cannonCam = cam; this.cannon = cannon; }
private void Start() { playerRigidbody = GetComponent <Rigidbody2D>(); playerAnimator = GetComponent <Animator>(); cannonHandler = cannon.GetComponent <CannonHandler>(); cannonSprite = cannon.GetComponent <SpriteRenderer>(); playerCollider = GetComponent <BoxCollider2D>(); }
public void Start() { cannonHandler = GetComponentInChildren <CannonHandler>(); }