// Update is called once per frame private void Update() { InRange(); if (canPickUp && Input.GetKeyDown(KeyCode.E)) { PickUp(); flashlight flash = flashlightObject.GetComponent <flashlight>(); flash.SetBatterylife(amount); } }
// Start is called before the first frame update void Start() { flashLight = GameObject.Find("FlashLight"); jump1 = GameObject.Find("Jump Puzzle 1 Entrance"); jump2 = GameObject.Find("Jump Puzzle 2 Entrance"); jump3 = GameObject.Find("Jump Puzzle 3 Entrance"); tile1 = GameObject.Find("Tile Puzzle 1 Entrance"); tile2 = GameObject.Find("Tile Puzzle 2 Entrance"); walkScript = gameObject.GetComponent <walk>(); minotaurSpawnerScript = gameObject.GetComponent <minotaurSpawner>(); flashlightScript = flashLight.GetComponent <flashlight>(); }
void Start() { light = GetComponent<flashlight>(); myo = GameObject.Find("Myo"); thalmicMyo = myo.GetComponent<ThalmicMyo>(); }