added new art assets

also fixed some bugs with collision
This commit is contained in:
slevy14
2023-04-13 12:20:17 -07:00
parent 5a1ab041de
commit f7581dad01
247 changed files with 11530 additions and 51 deletions

View File

@@ -19,6 +19,7 @@ public class TambourineBehavior : MonoBehaviour {
void Awake() {
this.gameObject.GetComponent<CircleCollider2D>().enabled = true;
rb = this.gameObject.GetComponent<Rigidbody2D>();
animator = this.gameObject.GetComponent<Animator>();
player = GameObject.FindGameObjectWithTag("Player");
@@ -50,11 +51,12 @@ public class TambourineBehavior : MonoBehaviour {
void OnTriggerEnter2D(Collider2D col) {
collidedObject = col.gameObject;
this.gameObject.GetComponent<CircleCollider2D>().enabled = false;
if (collidedObject.tag == "Enemy") {
this.gameObject.GetComponent<CircleCollider2D>().enabled = false;
collidedObject.GetComponent<EnemyPatrol>().pinned = true;
} else if (collidedObject.tag == "Projectile") {
// print("pinned");
this.gameObject.GetComponent<CircleCollider2D>().enabled = false;
collidedObject.GetComponent<ProjectileBehavior>().Pin();
}
}

View File

@@ -8,10 +8,6 @@ public class Tutorial_GrapplingGun : MonoBehaviour {
[Header("Scripts References:")]
public Tutorial_GrapplingRope grappleRope;
[Header("Layers Settings:")]
[SerializeField] private bool grappleToAll = false;
[SerializeField] private int grappleLayerNumber = 9;
[Header("Main Camera:")]
public Camera m_camera;