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