//public DepthOfField DoF; void Start() { Floor = GameObject.Find("Floor").GetComponent <Renderer>(); blueLight = GameObject.Find("BlueFlashlight"); blueLight.GetComponent <Light>().intensity = 2; top = GameObject.Find("Flare1"); secondTop = GameObject.Find("Flare2"); middle = GameObject.Find("Flare3"); secondLowest = GameObject.Find("Flare4"); lowest = GameObject.Find("Flare5"); NightVisionLight = GameObject.Find("NightVision"); NightVisionLight.SetActive(false); sonarLight = GameObject.Find("SonarLight"); sonarLight.SetActive(false); hospitalGirl = GameObject.Find("HospitalGirl"); lights = GameObject.FindGameObjectsWithTag("Light"); environ = GameObject.FindGameObjectsWithTag("Environment"); enemies = GameObject.FindGameObjectsWithTag("Enemy"); misc = GameObject.FindGameObjectsWithTag("Other"); items = GameObject.FindGameObjectsWithTag("Item"); flashLight = GetComponent <Flashlight> (); grain = GameObject.Find("Main Camera").GetComponent <NoiseAndGrain> (); grain.enabled = false; echoSpherez = GetComponent <EchoSpherez> (); enemyDamage = GameObject.Find("HospitalGirl").GetComponent <HospitalGirl> (); //DoF = Camera.main.GetComponent<DepthOfField>(); rend = new Renderer[environ.Length]; }
void Start() { oldMan = GameObject.Find("OldMan"); hG = GameObject.Find("HospitalGirl"); eyesHere = GameObject.Find("EyesHere"); cam = GameObject.Find("Main Camera"); activationSwitch = GameObject.Find("Activation Switch"); tr = transform; enemyDamage = GameObject.Find("HospitalGirl").GetComponent <HospitalGirl> (); wander = GameObject.Find("OldMan").GetComponent <Wander> (); inventory = GetComponent <Inventory> (); environment = GameObject.Find("Environment").GetComponent <Environmental>(); collect = GameObject.Find("First Person Controller").GetComponent <CollectItem> (); chMotor = GetComponent <CharacterMotorC>(); ch = GetComponent <CharacterController>(); dist = ch.height / 2; // calculate distance to ground }
void Start() { for (int i = 0; i < (slotsX * slotsY); i++) { slots.Add(new Item()); inventory.Add(new Item()); } holdingKey = GameObject.Find("HoldingKey"); holdingGun = GameObject.Find("HoldingGun"); holdingGloves = GameObject.FindGameObjectsWithTag("Gloves"); holdingRock = GameObject.Find("HoldingRock"); holdingPoisonHead = GameObject.Find("HoldingPoisonHead"); holdingAnatomy = GameObject.Find("HoldingAnatomy"); holdingTicket = GameObject.Find("HoldingTicket"); holdingElevatorKey = GameObject.Find("HoldingElevatorKey"); holdingKey.SetActive(false); holdingGun.SetActive(false); holdingRock.SetActive(false); foreach (GameObject _obj in holdingGloves) { _obj.SetActive(false); } holdingAnatomy.SetActive(false); holdingPoisonHead.SetActive(false); holdingTicket.SetActive(false); holdingElevatorKey.SetActive(false); unPause = true; slotsX = 6; slotsY = 2; lastTapTime = 0; tapSpeed = .25f; playerLook = (MouseLook)GameObject.Find("First Person Controller").GetComponent("MouseLook"); playerCameraLook = (MouseLook)GameObject.Find("Main Camera").GetComponent("MouseLook"); database = GameObject.Find("Item Database").GetComponent <ItemDatabase> (); collect = GetComponent <CollectItem>(); enemyDamage = GameObject.Find("HospitalGirl").GetComponent <HospitalGirl> (); //AddItem (0); //RemoveItem (0); //print (InventoryContains(1)); //How many items are in the inventory? }