12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- [ExecuteInEditMode]
- public class shuxing : MonoBehaviour
- {
- // Start is called before the first frame update
- public float Age=1;
- public List<GameObject> Angle_Obj;
- bool aa=false;
- void Start()
- {
-
- }
- private void OnEnable()
- {
- // Angle_Obj.Add(this.gameObject.transform.GetChild(0).gameObject);
- }
- //public float Age
- //{
- // get
- // {
- // Debug.Log("bbbbbbb" + aaage);
- // return aaage;
- // }
- // set
- // {
- // Debug.Log("bbbbbbb");
- // aaage = value;
- // }
- //}
- // Update is called once per frame
- void Update()
- {
- Debug.Log(this.gameObject.transform.GetChild(0).gameObject);
- if (aa == false && this.gameObject.transform.GetChild(0).gameObject != null)
- {
- // Angle_Obj.Add(this.gameObject.transform.GetChild(0).gameObject);
- aa = true;
- //for (int i = 0; i < Angle_Obj.Count; i++)
- //{
- // Debug.Log(Angle_Obj[i].name);
- //}
-
- }
- this.gameObject.transform.GetChild(0).transform.localScale = new Vector3(Age, Age, 1);
- }
-
- }
|