Exemplo n.º 1
0
 private void Start()
 {
     _rotate = GetComponent <LSRotate>();
     if (_rotate == null)
     {
         _rotate = gameObject.AddComponent <LSRotate>();
     }
 }
Exemplo n.º 2
0
 private void FindChild()
 {
     _animation = transform.FindChild("zhizhen").GetComponent <Animation>();
     _rotate    = GetComponent <LSRotate>();
     if (_rotate == null)
     {
         _rotate = gameObject.AddComponent <LSRotate>();
     }
 }