Exemple #1
0
    void Start()
    {
        ard         = arduinoInput.GetComponent <Arduino_AllInputs>();
        playSound   = GameObject.Find("Sound Manager").GetComponent <AudioSource>();
        sound       = GameObject.Find("Sound Manager").GetComponent <SoundManagerScript>();
        scene1Video = GameObject.Find("Scene1");
        scene2Video = GameObject.Find("Scene2");

        scene1Video.SetActive(false);
        scene2Video.SetActive(false);
        StartCoroutine(InputCooldown());
    }
Exemple #2
0
    // PRIVATE METHODS

    // Set up Arduino
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
            GetPortNames();
            Connect(portName);

            // If using the coroutine for Arduino polling
            if (pollingMethod.usingCoroutine)
            {
                StartArduino();
            }
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
        inputData = new int[totalInputs];
    }
 // Use this for initialization
 void Start()
 {
     arduino = Arduino_AllInputs.instance;
 }
 void Start()
 {
     // The Arduino_AllInputs prefab must be in your scene
     arduino = Arduino_AllInputs.instance;
     aSource = gameObject.GetComponent <AudioSource>();
 }
 void Start()
 {
     // The Arduino_AllInputs prefab is a static instance. It must be in your Hierarchy
     arduino = Arduino_AllInputs.instance;
 }
Exemple #6
0
 void Start()
 {
     // The Arduino_AllInputs prefab must be in your scene
     arduino = Arduino_AllInputs.instance;
 }