Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (player == null)
     {
         player = GameObject.FindGameObjectWithTag("Player").GetComponent <AttachCol>();
     }
     if (Input.GetMouseButtonDown(0))
     {
         player.Detatch();
     }
 }
Exemplo n.º 2
0
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <AttachCol>();
 }