Пример #1
0
 // 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);
     }
 }
Пример #2
0
    // 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>();
    }
Пример #3
0
 void Start()
 {
     light = GetComponent<flashlight>();
     myo = GameObject.Find("Myo");
     thalmicMyo = myo.GetComponent<ThalmicMyo>();
 }