Exemplo n.º 1
0
    public void Start()
    {
        reading       = false;
        controller    = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();
        type2strategy = new Dictionary <MagicMissile.MagicType, ReadingStrategy> ();


        Sprite circle = Resources.Load <Sprite> ("FireCircle");

        type2strategy.Add(MagicMissile.MagicType.Fire, new CircleReadingStrategy(fireThresholds, circle, 50));

        /*
         * GameObject ball = Resources.Load<GameObject> ("FireballEffect");
         * type2strategy.Add (MagicMissile.MagicType.Fire, new EnlargeBallReadingStrategy(fireThresholds, ball, 20));
         */
        /*
         * circle = Resources.Load<Sprite> ("IceCircle");
         * type2strategy.Add (MagicMissile.MagicType.Ice, new EnlargeCircleReadingStrategy(iceThresholds, circle));
         */
        /*
         * Sprite circle = Resources.Load<Sprite> ("IceCircle");
         * type2strategy.Add (MagicMissile.MagicType.Ice, new CircleReadingStrategy(iceThresholds, circle, 80));
         */

        GameObject ball = Resources.Load <GameObject> ("IceballEffect");

        type2strategy.Add(MagicMissile.MagicType.Ice, new EnlargeBallReadingStrategy(iceThresholds, ball, 20));
    }
    // Use this for initialization
    void Start()
    {
        gazePoint = new Vector2();

        controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();
        controller.UpdateAttentionEvent += OnUpdateAttention;
    }
Exemplo n.º 3
0
    void Start()
    {
        controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        controller.UpdateAttentionEvent  += OnUpdateAttention;
    }
Exemplo n.º 4
0
 void Start()
 {
     animator = GetComponent <Animator>();
     animator.SetInteger("relaxation", 50);
     controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();
     controller.UpdateMeditationEvent += OnUpdateMeditation;
 }
Exemplo n.º 5
0
    void Start()
    {
        learning();
        controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        controller.UpdateAttentionEvent  += OnUpdateAttention;
        controller.UpdateMeditationEvent += OnUpdateMeditation;
        controller.UpdateRawdataEvent    += OnUpdateRawdata;

        controller.UpdateDeltaEvent += OnUpdateDelta;

        controller.UpdateBlinkEvent += OnUpdateBlink;


        controller.UpdateThetaEvent     += OnUpdateTheta;
        controller.UpdateLowAlphaEvent  += OnUpdateLowAlpha;
        controller.UpdateHighAlphaEvent += OnUpdateHighAlpha;
        controller.UpdateLowBetaEvent   += OnUpdateLowBeta;
        controller.UpdateHighBetaEvent  += OnUpdateHighBeta;
        controller.UpdateLowGammaEvent  += OnUpdateLowGamma;
        controller.UpdateHighGammaEvent += OnUpdateHighGamma;

        //�����ɃR�l�N�V�������g���C����̂ŁA��ڑ��̏ꍇ������R�����g�A�E�g
        //try�ɂ��Ă����Ŗ����Ƀ��[�v���邩��_��������
        //controller.Connect();
        counter        = 0;
        counter2       = 0;
        attack_counter = 0;
    }
Exemplo n.º 6
0
    void Start()
    {
        Debug.Log("DisplayData Start()...");

        controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();
        Debug.Log("Controller Found!");

        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        controller.UpdateAttentionEvent  += OnUpdateAttention;
        controller.UpdateMeditationEvent += OnUpdateMeditation;
        controller.UpdateBlinkEvent      += OnUpdateBlink;


        controller.UpdateLowAlphaEvent  += OnUpdateLowAlpha;
        controller.UpdateHighAlphaEvent += OnUpdateHighAlpha;

        controller.UpdateLowBetaEvent  += OnUpdateLowBeta;
        controller.UpdateHighBetaEvent += OnUpdateHighBeta;

        controller.UpdateLowGammaEvent  += OnUpdateLowGamma;
        controller.UpdateHighGammaEvent += OnUpdateHighGamma;

        controller.UpdateThetaEvent += OnUpdateTheta;

        controller.UpdateDeltaEvent += OnUpdateDelta;

        Debug.Log("Start() Done!");
    }
Exemplo n.º 7
0
    void Start()
    {
        text = GetComponent <Text>();
        UpdateUI();
        controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        controller.UpdateMeditationEvent += OnUpdateMeditation;
        controller.UpdateAttentionEvent  += OnUpdateAttention;
    }
Exemplo n.º 8
0
    void Start()
    {
        controller = GameObject.Find("NeuroSkyTGCController").GetComponent<TGCConnectionController>();

        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        controller.UpdateAttentionEvent += OnUpdateAttention;
        controller.UpdateMeditationEvent += OnUpdateMeditation;

        controller.UpdateDeltaEvent += OnUpdateDelta;
    }
Exemplo n.º 9
0
    void start()
    {
        maxdamage  = damage;
        speed      = 3;
        damage     = 10;
        life       = 10;
        controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        controller.UpdateMeditationEvent += OnUpdateMeditation;
    }
Exemplo n.º 10
0
 void Start()
 {
     //controller = gameObject.GetComponent<ThinkGearController>();
     controller = gameObject.GetComponent <TGCConnectionController>();      //uncomment when in editor
     controller.UpdateAttentionEvent  += onUpdateAttenction;
     controller.UpdatePoorSignalEvent += onUpdatePoorSignalEvent;
     controller.UpdateAttentionEvent  += onUpdateAttentionEvent;
     controller.UpdateMeditationEvent += onUpdateMeditationEvent;
     controller.UpdateRawdataEvent    += onUpdateRawdataEvent;
     controller.UpdateBlinkEvent      += onUpdateBlinkEvent;
 }
Exemplo n.º 11
0
    void Start()
    {
        //ball = ballGO.GetComponent<RollerBall> ();
        controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        controller.UpdateAttentionEvent  += OnUpdateAttention;
        controller.UpdateMeditationEvent += OnUpdateMeditation;

        controller.UpdateDeltaEvent += OnUpdateDelta;
    }
Exemplo n.º 12
0
    void Start()
    {
        controller = neuroSkyController.GetComponent <TGCConnectionController>();

        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        controller.UpdateAttentionEvent  += OnUpdateAttention;
        controller.UpdateMeditationEvent += OnUpdateMeditation;

        controller.UpdateDeltaEvent += OnUpdateDelta;
        InvokeRepeating("CountDown", 0, 0.1f);
    }
Exemplo n.º 13
0
    void Start()
    {
        neuroskyControlador = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        neuroskyControlador.UpdatePoorSignalEvent += OnUpdateSinal;

        AtualizarListaPortasDropdown();
        PegarVoltasSelecionadasText();

        // IniciarLocalizacaoArduino();
    }
Exemplo n.º 14
0
    void Start()
    {
        gm = GameManager.current;
        controller = TGCConnectionController.current;
        player = PlayerMovement.current;

        controller.UpdateBlinkEvent += OnUpdateBlink;
        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;

        if (initialState < numberOfStates) currentState = initialState;
        else currentState = 0;
    }
Exemplo n.º 15
0
    void Start()
    {
        controller = TGCConnectionController.current;

        controller.UpdateDeltaEvent += OnUpdateDelta;
        controller.UpdateThetaEvent += OnUpdateTheta;
        controller.UpdateLowAlphaEvent += OnUpdateLowAlpha;
        controller.UpdateHighAlphaEvent += OnUpdateHighAlpha;
        controller.UpdateLowBetaEvent += OnUpdateLowBeta;
        controller.UpdateHighBetaEvent += OnUpdateHighBeta;
        controller.UpdateLowGammaEvent += OnUpdateLowGamma;
        controller.UpdateHighGammaEvent += OnUpdateHighGamma;
    }
Exemplo n.º 16
0
    // Use this for initialization
    void Start()
    {
        controller = TGCConnectionController.current;

        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        controller.UpdateAttentionEvent += OnUpdateAttention;
        controller.UpdateMeditationEvent += OnUpdateMeditation;
        controller.UpdateBlinkEvent += OnUpdateBlink;

        controller.UpdateDeltaEvent += OnUpdateDelta;

        controller.Connect();

        initialY = transform.position.y;
    }
Exemplo n.º 17
0
    void Start()
    {
        controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        //controller.UpdateAttentionEvent += OnUpdateAttention;
        //controller.UpdateMeditationEvent += OnUpdateMeditation;

        controller.UpdateRawdataEvent    += OnUpdateRaw;
        controller.UpdateAttentionEvent  += OnUpdateAttention2;
        controller.UpdateMeditationEvent += OnUpdateMeditation2;
        controller.UpdateHighAlphaEvent  += OnUpdateAlpha;

        //controller.UpdateDeltaEvent += OnUpdateDelta;
    }
Exemplo n.º 18
0
    // Use this for initialization
    void Start()
    {
        wallsetOne    = GameObject.FindGameObjectWithTag("WallsetOne");
        wallsetTwo    = GameObject.FindGameObjectWithTag("WallsetTwo");
        startPosition = wallsetOne.transform.position;
        //wallsetTwo.transform.position += new Vector3(0, -10, 0);

        controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        controller.UpdateAttentionEvent  += OnUpdateAttention;
        controller.UpdateMeditationEvent += OnUpdateMeditation;

        controller.UpdateDeltaEvent += OnUpdateDelta;

        playerLight = GameObject.FindGameObjectWithTag("PlayerLight").GetComponent <Light>();
    }
Exemplo n.º 19
0
    void Start()
    {
        _controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();
        _data       = GameObject.Find("Main Camera").GetComponent <DisplayData>();
        //_concentrationBar = GameObject.Find("ConcentrationBarController").GetComponent<ConcentrationBar>();


        _middleBall       = Instantiate(_ballPrefab);
        _middleBallScript = _middleBall.GetComponent <Ball>();
        _middleBallScript.Setup(new Point(0, 0, 10, _middleBall.transform), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0));
        _middleBallScript.Updator();

        _centre      = _middleBallScript.Point.transform.position;
        _startRadius = _radius;

        _ball       = Instantiate(_ballPrefab);
        _ballScript = _ball.GetComponent <Ball>();
        _ballScript.Setup(new Point(200, 200, 10, _ball.transform), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0));
        _ballScript.DAngle = 1.5f;
    }
Exemplo n.º 20
0
    void Start()
    {
        controladorJogo     = ControladorJogo.Pegar();
        controladorConexoes = ControladorConexoes.Pegar();

        if (isServer)
        {
            idJogador = isLocalPlayer ? 1 : 2;
        }
        else
        {
            idJogador = isLocalPlayer ? 2 : 1;
        }

        PegarElementosCanvas();

        if (!isLocalPlayer)
        {
            return;
        }

        controladorNeuroSky = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        controladorNeuroSky.UpdatePoorSignalEvent += OnUpdateSinal;
        controladorNeuroSky.UpdateAttentionEvent  += OnUpdateConcentracao;

        if (controladorConexoes.arduino != null)
        {
            arduino = controladorConexoes.arduino;
            StartCoroutine
            (
                LerArduino((string s) => CmdContabilizarVolta(s))
                // LerArduino((string s) => Debug.Log(s))
            );
        }

        StartCoroutine(GravarArduino());
    }
Exemplo n.º 21
0
 void Start()
 {
     spriteRenderer = GetComponent <SpriteRenderer>();
     controller     = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();
     controller.UpdateMeditationEvent += OnUpdateMeditation;
 }
Exemplo n.º 22
0
    void Start()
    {
        _controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();

        _controller.UpdateBlinkEvent += OnBlink;
    }
Exemplo n.º 23
0
    void Start()
    {
        controller = TGCConnectionController.current;

        controller.UpdateBlinkEvent += OnUpdateBlink;
    }
Exemplo n.º 24
0
    void Start()
    {
        controller = TGCConnectionController.current;

        controller.UpdateBlinkEvent += OnUpdateBlink;
        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;

        player = PlayerMovement.current;

        if (Application.loadedLevelName == "TitleScreen"){
            blackOverlay.enabled = true;
            blackOverlay.color = Color.black;
            introText.enabled = true;
        }
    }
Exemplo n.º 25
0
    public void StartNeuroSkyData()
    {
        transform.SetParent(Camera.main.transform);
        Scope = ProfileManager.Instance.currentEvaluationScope;
        GameObject prefab = Instantiate(TCGConnectionPrefab, Vector3.zero, Quaternion.identity) as GameObject;

        controller = prefab.GetComponent <TGCConnectionController>();

        if (usePoorSignal)
        {
            controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        }

        if (useAttention)
        {
            controller.UpdateAttentionEvent += OnUpdateAttention;
        }

        if (useMeditation)
        {
            controller.UpdateMeditationEvent += OnUpdateMeditation;
        }

        if (useBlink)
        {
            controller.UpdateBlinkEvent += OnUpdateBlink;
        }


        if (useDelta)
        {
            controller.UpdateDeltaEvent += OnUpdateDelta;
        }

        if (useTheta)
        {
            controller.UpdateThetaEvent += OnUpdateTheta;
        }

        if (useLowAlpha)
        {
            controller.UpdateLowAlphaEvent += OnUpdateLowAlpha;
        }

        if (useHighAlpha)
        {
            controller.UpdateHighAlphaEvent += OnUpdateHighAlpha;
        }


        if (useLowBeta)
        {
            controller.UpdateLowBetaEvent += OnUpdateLowBeta;
        }

        if (useHighBeta)
        {
            controller.UpdateHighBetaEvent += OnUpdateHighBeta;
        }

        if (useLowGamma)
        {
            controller.UpdateLowGammaEvent += OnUpdateLowGamma;
        }

        if (useHighGamma)
        {
            controller.UpdateHighGammaEvent += OnUpdateHighGamma;
        }

        /*
         * Initializes the CvsCreator to store data in a log
         */
        dataLogPath = GLPlayerPrefs.GetString(Scope, "NeuroSkyMindwaveDataPath");
        Debug.Log("neurosky path: " + GLPlayerPrefs.GetString(Scope, "NeuroSkyMindwaveDataPath"));
        if (dataLogPath.Equals(""))
        {
            csvCreator = new CsvCreator("NeuroSkyMindwaveDataLog\\data.csv");
        }
        else
        {
            csvCreator = new CsvCreator(dataLogPath);
        }
    }
Exemplo n.º 26
0
 void Start()
 {
     _TGCcontroller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();
     _objRespawner  = GameObject.FindGameObjectWithTag("ObjRespawner").GetComponent <ObjRespawner>();
     _TGCcontroller.UpdateBlinkEvent += OnBlink;
 }
Exemplo n.º 27
0
    //public int attention;

    // Use this for initialization
    void Start()
    {
        controller = GameObject.Find("NeuroSkyTGCController").GetComponent <TGCConnectionController>();
        Data       = GameObject.Find("Main Camera").GetComponent <DisplayData>();
    }
    //private float delta;
    void Start()
    {
        //playerprefs
        medDur = PlayerPrefs.GetFloat ("medDur");
        medTot = PlayerPrefs.GetInt ("medTot");

        //find and connect controller
        controller = GameObject.Find("NeuroSkyTGCController").GetComponent<TGCConnectionController>();

        controller.Connect ();

        //update signals
        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        //controller.UpdateAttentionEvent += OnUpdateAttention;
        controller.UpdateMeditationEvent += OnUpdateMeditation;

        //controller.UpdateDeltaEvent += OnUpdateDelta;
    }
Exemplo n.º 29
0
    void Start()
    {
        controller = TGCConnectionController.current;

        controller.UpdatePoorSignalEvent += OnUpdatePoorSignal;
        controller.UpdateBlinkEvent += OnUpdateBlink;
        controller.UpdateAttentionEvent += OnUpdateAttention;

        rigidbody = GetComponent<Rigidbody>();
        audioSource = GetComponent<AudioSource>();

        initialMaxSpeed = playerMaxSpeed;
    }
Exemplo n.º 30
0
 void Awake()
 {
     if (!current)
     current = this;
     else Destroy (this.gameObject);
 }