333GameStudio

Spawn

Jan 12th, 2017
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. var Block : Transform;
  3.  
  4.  
  5. function Update () {
  6. if(Input.GetMouseButtonDown(0)){
  7.  
  8. clear();
  9.  
  10.  
  11. }
  12. }
  13. function clear(){
  14.  
  15.  
  16.    Instantiate(Block,transform.position,transform.rotation);
  17. Destroy(gameObject);
  18.  
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment