Пример #1
0
 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);
 }
Пример #2
0
 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,
     };
 }
Пример #3
0
    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;
        };
    }
Пример #4
0
 void Start()
 {
     record = GetComponent <HasImageRecord>();
 }
Пример #5
0
 void Awake()
 {
     plantPool = PlantPrefab.GetObjectPool(1000);
     record    = GetComponent <HasImageRecord>();
 }