示例#1
0
 void Update()
 {
     if (outOfBounds.IsOutOfBounds(gameObject.transform))
     {
         gameObject.SetActive(false);
     }
 }
示例#2
0
 void Update()
 {
     if (outOfBounds == null)
     {
         gameController = GameControllerScript.GetInstance();
         outOfBounds    = gameController.GetComponent <OutOfBounds>();
     }
     if (outOfBounds.IsOutOfBounds(gameObject.transform))
     {
         gameObject.SetActive(false);
     }
 }