void Awake() { AllInCurrentScene.Add(this); Record = GetComponent <HasImageRecord>(); dieOverTime = GetComponent <DieOverTime>(); dieOverTime.enabled = false; renderer = this.GetComponentInSelfOrChildren <Renderer>(); Properties = new MaterialPropertyBlock(); renderer.GetPropertyBlock(Properties); glimmerParticles = this.GetComponentInChildren <ParticleSystem>(); glimmerParticles.enableEmission(false); }
void Awake() { record = GetComponent <HasImageRecord>(); drag = transform.parent.GetComponent <SemiDrag>(); solid = transform.parent.Find("pSolid1").gameObject; shards = new List <GameObject> { transform.parent.Find("shard1_surfaceShatter").gameObject, transform.parent.Find("surfaceShatter_shard2").gameObject, transform.parent.Find("surfaceShatter_shard3").gameObject, transform.parent.Find("surfaceShatter_shard4").gameObject, transform.parent.Find("surfaceShatter_shard5").gameObject, }; }
void Awake() { seedRenderer = GetComponent <Renderer>(); collider = GetComponent <Collider>(); record = GetComponent <HasImageRecord>(); particles = GetComponentInChildren <ParticleSystem>(); var interactable = GetComponent <VRTK_InteractableObject>(); interactable.InteractableObjectGrabbed += (sender, args) => { collider.enabled = false; }; GetComponent <VRTK_InteractableObject>().InteractableObjectUngrabbed += (sender, args) => { collider.enabled = true; WillGrowPlant = true; }; }
void Start() { record = GetComponent <HasImageRecord>(); }
void Awake() { plantPool = PlantPrefab.GetObjectPool(1000); record = GetComponent <HasImageRecord>(); }