daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest May 16th, 2018 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var goCube05: GameObject;
  2. var goCube06: GameObject;
  3. var cubeCollider: GameObject;
  4. static var checkCollect: int;
  5.  
  6. function Awake()
  7. {
  8.     cubeCollider = GameObject.Find("CubeCollider3");
  9.     goCube05 = GameObject.Find("Cube05");
  10.     goCube06 = GameObject.Find("Cube06");
  11. }
  12.  
  13. function OnTriggerEnter (objectCollided: Collider)
  14. {
  15.     var flyOff : flyoff;
  16.     flyOff = objectCollided.GetComponent(flyoff);
  17.     flyOff.collecting(1);
  18.     goCube05.renderer.enabled = false;
  19.     goCube06.renderer.enabled = false;
  20. }
  21.  
  22. function OnTriggerExit (objectCollided: Collider)
  23. {
  24.     Destroy(cubeCollider);
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top