Example #1
0
    void Start()
    {
        Application.runInBackground = true;

        ControllerPlayers = new List <ControllerPlayer>();
        FindAllControllers();

        RumblingRightNow = false;
        RumbleTimer      = 0;
        RumbleInterval   = 1;
        ReadyToGetInput  = false;
        inputCounter     = 0;
        InputTime        = 0;
        usingHelpPaper   = true;

        LoggingManager.CreateTextFile("ControllerTest_");
        LoggingManager.AddTextNoTimeStamp("PlayerID, UsingHelpPaper, RumbleType, RumbleVariation, PlayerAnswer, RumbleDuration, ReactionTime, ReactionTimeMinusRumbleDuration, CorrectButtonPress\n\n");
    }
Example #2
0
    private void Start()
    {
        Application.runInBackground = true;

        textObject = GameObject.Find("textObject");
        LoggingManager.CreateTextFile();

        Players = new List <PlayerRumble>(4);

        for (int i = 1; i < 5; i++)
        {
            PlayerRumble p = new PlayerRumble(i);
            p.state = GamePad.GetState(p.index);

            Players.Add(p);

            Debug.Log(p + " is connected: " + p.ControllerIsConnected().ToString());
        }
    }
Example #3
0
    void Start()
    {
        TimeLeft = TimePerRound;

        CurrentRound = NumberOfRoundsPerGame + 1;

        TargetChosenSoFar = new List <int>();

        HasPlayedAtLeastOnce = false;

        for (int i = Players.Count - 1; i >= 0; i--)
        {
            GameObject p = Players[i];

            if (!p.GetComponent <Player>().HasBeenChosen)
            {
                Players.Remove(p);
                Destroy(p);
            }
        }


        // TODO: make practice rumble things

        /*foreach (GameObject g in Players)
         * {
         *
         *  MissionBase m = new MissionKill();
         *  string scriptName = m.ToString();
         *  g.AddComponent(scriptName);
         *
         *  g.GetComponent<MissionBase>().PraciceRumbles();
         *
         *
         * }*/



        Camera = GameObject.Find("Main Camera").camera;
        if (Camera == null)
        {
            Debug.Log("ERROR - Game Manager needs a link to the camera!");
        }

        if (MainLight == null)
        {
            Debug.Log("ERROR - assign directional light to TextFade");
        }

        if (TimeBar == null)
        {
            Debug.Log("ERROR - assign timebar to Game Manager");
        }


        MissionManager.Instance.GetNewMissions();

        if (UseAnnouncer)
        {
            StartCoroutine(StartCalibrationVoice());
        }
        else
        {
            StartCoroutine(StartRumblePractices());
        }

        if (LogForTest)
        {
            LoggingManager.CreateTextFile();
            string text = "PlayerID, CurrentMissionType, TotalMissionsPlayerHasHadSoFar, ButtonPressType, ThisButtonPressNumber, TimeSinceReceivedMission";
            LoggingManager.AddTextNoTimeStamp(text);
        }
    }