Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function OnControllerColliderHit(hit : ControllerColliderHit)
- {
- if(hit.gameObject.tag == "BOX")
- {
- Destroy(hit.gameObject);
- var EXPLOSION = Instantiate(EXP, hit.gameObject.transform.position, hit.gameObject.transform.rotation);
- Destroy(EXPLOSION, 5);
- gameObject.GetComponent(LegoPlayerMove).ChrSpeed = 5;
- gameObject.GetComponent(LegoPlayerMove).anim.SetBool("RUN", true);
- yield WaitForSeconds(10);
- gameObject.GetComponent(LegoPlayerMove).ChrSpeed = 2;
- gameObject.GetComponent(LegoPlayerMove).anim.SetBool("RUN", false);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement