Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var bar : UIProgressBar;
- function Start()
- {
- bar = GetComponentInChildren(UIProgressBar);
- }
- function Update () {
- transform.position.z = 25;
- }
- function OnCollisionEnter( other: Collision)
- {
- if(other.gameObject.tag == "egg")
- {
- Debug.Log("you have been egged");
- bar.Value = 0.1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement