Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Update ()
- {
- if (animationTimer > 0)
- {
- animationTimer -= 1;
- }
- }
- void OnTriggerEnter (Collider other)
- {
- animationTimer += 10;
- if (other.gameObject.tag == "Collectable")
- {
- while (animationTimer > 0)
- {
- other.gameObject.transform.position = PickUpHelper.transform.position;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement