// Use this for initialization void Start() { if (this.food == EFood.MUSHROOM) { _objectFood = GetComponentInParent <ObjectCatch> (); } }
// Use this for initialization void Start() { this._boxCollider = GetComponent <Collider> (); this._text = GetComponentInChildren <Text> (); this._pointLight = GetComponentInChildren <Light> (); if (this.isObject) { this._object = GetComponentInParent <ObjectCatch> (); } this._text.text = this.objectName; this._text.enabled = false; this._pointLight.enabled = false; }
void InstantiateObjectWithTag() { this._currentTimeToRespawn = 0; this.isPulled = false; this.objectCatch = Instantiate(this.objectCatchPrefab, transform.position, transform.rotation) as ObjectCatch; if (this.isPointRight) { this.objectCatch.tag = "MushroomB"; } else { this.objectCatch.tag = "MushroomA"; } }