added transition scene with basic tutorial AND PERSISTENT DATA

PLEASE launch game from the main menu scene, otherwise persistent data will not load correctly
This commit is contained in:
slevy14
2023-04-25 13:27:12 -07:00
committed by Nicholas Novak
parent d4e4fb87c0
commit 3de471ecd7
17 changed files with 1790 additions and 242 deletions

View File

@@ -52,16 +52,19 @@ public class TambourineBehavior : MonoBehaviour {
}
void OnTriggerEnter2D(Collider2D col) {
collidedObject = col.gameObject;
if (collidedObject.tag == "Enemy") {
print(col.tag);
if (col.tag == "Enemy") {
collidedObject = col.gameObject;
print("Pinning to enemy");
this.gameObject.GetComponent<CircleCollider2D>().enabled = false;
collidedObject.GetComponent<EnemyPatrol>().pinned = true;
collidedObject.GetComponent<EnemyPatrol>().TogglePin(true);
} else if (collidedObject.tag == "Projectile") {
// print("pinned");
} else if (col.tag == "Projectile") {
collidedObject = col.gameObject;
print("pinned to projectile");
this.gameObject.GetComponent<CircleCollider2D>().enabled = false;
collidedObject.GetComponent<ProjectileBehavior>().Pin();
}
}
}
void OnCollisionEnter2D(Collision2D col) {