// Use this for initialization void Start() { p = transform.gameObject.GetComponent <pickItems>(); e = transform.gameObject.GetComponent <ElementControl>(); well = wellwater.GetComponent <WaterProperties>(); w1 = lake1.GetComponent <WaterProperties>(); w2 = lake2.GetComponent <WaterProperties>(); L = GameObject.FindGameObjectWithTag("fire base1").transform.gameObject.GetComponent <DoorTorchLight>(); L2 = firebase2.GetComponent <DoorTorchLight>(); }
public bool isPaused = false; //used when game is paused // Use this for initialization void Start() { scene = SceneManager.GetActiveScene(); //playGrowingSound = false; try { L = GameObject.FindGameObjectWithTag("fire base1").transform.gameObject.GetComponent <DoorTorchLight>(); } catch (NullReferenceException e) { Debug.Log("No fire base found"); } elementIndex = elementType.wind; GUICanvas.GetComponent <GUIControl>().SelectElement((int)elementIndex); windBlowing = false; windDirection = Vector3.zero; waterStored = 0; model = gameObject.GetComponent <actorcontroller> ().model; anim = model.GetComponent <Animator> (); pushableObjects = GameObject.FindGameObjectsWithTag("Pushable"); //vineBridge = GameObject.FindGameObjectWithTag("original vine"); headObject = transform.Find("CameraHandle"); if (headObject == null) { headObject = transform.Find("CameraHandle2").Find("CameraHandle"); } //Debug.Log(headObject); windCollider = headObject.Find("WindCollision"); //Debug.Log(windCollider); forwardWindParticles = headObject.Find("forward wind"); backwardWindParticles = headObject.Find("backwards wind"); backWindPos = headObject.Find("backwards wind position"); groundDust = new List <ParticleSystem>(); waterIn = null; }