Added sounds, fixed some bugs
added a sound for the tambourine, spider web, and background music.\n- finally fixed the web animation\n- added Sir Jacques to the web animation\n- changed the way the fire point tracks the grapple
This commit is contained in:
@@ -16,6 +16,7 @@ public class TambourineBehavior : MonoBehaviour {
|
||||
private GameObject player;
|
||||
|
||||
public bool pinned = false;
|
||||
public AudioSource tambourineHitSound;
|
||||
|
||||
|
||||
void Awake() {
|
||||
@@ -40,9 +41,10 @@ public class TambourineBehavior : MonoBehaviour {
|
||||
// this.gameObject.transform.position = col.transform.position;
|
||||
timeLerped += Time.deltaTime;
|
||||
this.gameObject.transform.position = Vector2.Lerp(this.gameObject.transform.position, collidedObject.transform.position, timeLerped/timeToLerp);
|
||||
if (this.gameObject.transform.position.x == collidedObject.transform.position.x && this.gameObject.transform.position.y == collidedObject.transform.position.y) {
|
||||
if (this.gameObject.transform.position.x == collidedObject.transform.position.x && this.gameObject.transform.position.y == collidedObject.transform.position.y && !pinned) {
|
||||
animator.SetBool("pinned", true);
|
||||
pinned = true;
|
||||
tambourineHitSound.Play();
|
||||
} else {
|
||||
// print("pinned, but not same position: " + this.gameObject.transform.position + " / " + collidedObject.transform.position);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user