示例#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();
     }
 }
示例#2
0
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <AttachCol>();
 }