2 using System.Collections;
3 using System.Collections.Generic;
6 public class Scissors : MonoBehaviour
14 public void StartShoot(bool isFacingLeft, Vector2 velocity)
16 Rigidbody2D rb2d = GetComponent<Rigidbody2D>();
17 transform.localScale = new Vector3(0.4f, 0.4f, 1);
19 if (isFacingLeft == true)
21 rb2d.velocity = new Vector2(-speed, 0) + velocity;
25 rb2d.velocity = new Vector2(speed, 0) + velocity;
28 Vector2 movementDirection = rb2d.velocity;
29 movementDirection.Normalize();
30 transform.rotation = Quaternion.LookRotation(Vector3.forward, movementDirection) * Quaternion.Euler(0, 0, 90);
32 Destroy(gameObject, lifeTime);