Exemplo n.º 1
0
 public void calibrate()
 {
     pressed = true;
     StaticEMG.Stop();
     // StaticEMG.Instance.EMG.calibrateMax();
     StaticEMG.Run();
 }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     animator = this.gameObject.GetComponent <Animator>();
     StaticEMG.Run();
     ScreenTopPosition = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height, 0));
     ScreenBotPosition = Camera.main.ScreenToWorldPoint(Vector3.zero);
 }
Exemplo n.º 3
0
 private void Start()
 {
     mainCamera = Camera.main;
     ResizeBorders();//setting 'Player's' moving borders deending on Viewport's size
     if (SceneManager.GetActiveScene().name == "Level_1")
     {
         StaticEMG.Instance.EMG.setGoal(35);
         StaticEMG.Run();
     }
 }
Exemplo n.º 4
0
 void Start()
 {
     StaticEMG.Run();
     controller = GetComponent <CharacterController2D>();
     coinsCount = 0;
     SetCountText();
     anim      = GetComponent <Animator>();
     transform = GetComponent <Transform>();
     //Console.ReadKey();
     yposition = -8f;//background.GetComponent<Transform>().position.y - (background.GetComponent<SpriteRenderer>().sprite.bounds.size.y /2);
     //  Debug.Log(yposition);
     float bgHeight = background.GetComponent <SpriteRenderer>().sprite.bounds.size.y;
 }
Exemplo n.º 5
0
 void Start()
 {
     //StaticEMG.Instance.EMG.calibrateMax();
     //StaticEMG.Instance.EMG.setMax(55);
     StaticEMG.Run();
     controller = GetComponent <CharacterController2D>();
     coinsCount = 0;
     SetCountText();
     anim      = GetComponent <Animator>();
     transform = GetComponent <Transform>();
     //Console.ReadKey();
     //Debug.Log(yposition);
     float bgHeight = background.GetComponent <SpriteRenderer>().sprite.bounds.size.y;
 }
Exemplo n.º 6
0
 private void Start()
 {
     //receiving shooting visual effects components
     guns.leftGunVFX    = guns.leftGun.GetComponent <ParticleSystem>();
     guns.rightGunVFX   = guns.rightGun.GetComponent <ParticleSystem>();
     guns.centralGunVFX = guns.centralGun.GetComponent <ParticleSystem>();
     if (SceneManager.GetActiveScene().name == "Level_2")
     {
         charge.SetActive(true);
         chargingBarImage        = GameObject.Find("ChargingBar").GetComponent <Image>();//set the health to 3 and update the health bar
         chargingBarImage.sprite = chargingBarSprites.charged_0;
         //StaticEMG.Instance.EMG.setGoal(15);
         StaticEMG.Run();
     }
 }
Exemplo n.º 7
0
 private void Awake()
 {
     if (emg == null)
     {
         Debug.Log("StaticEMG: Awake: Created EMG");
         emg = new EMGReader(debugMode);
     }
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
 }
Exemplo n.º 8
0
    public void Record()
    {
        StaticEMG.Run();
        recording.value = true;
        //startRecording = false;
        int timeSeconds;

        try
        {
            timeSeconds = int.Parse(TimeToRecord.text);
        }
        catch
        {
            timeSeconds = 0;
        }
        Debug.Log("WindowGraph: Record: Starting Recording");
        StaticEMG.Instance.StartRecord(timeSeconds, recording);
    }
Exemplo n.º 9
0
 public void setCOMPort()
 {
     Debug.Log("WindowGraph: setCOMPort: Set called");
     StaticEMG.Stop();
     StaticEMG.Instance.EMG.SetPort(COMPortDropDown.options[COMPortDropDown.value].text);
 }