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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user