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