Exemplo n.º 1
0
    private void Update()
    {
        if (!testLeg & debugMode)
        {
            _testStep = 0;
        }
        if (testLeg & debugMode)
        {
            BeginTest();
        }
        if (demoWalk & debugMode)
        {
            WalkDemo();
        }
        if (!debugMode)
        {
            ApplyAskedPositions();
        }
        RefreshMotors();
        RefreshSensorValues();
        _prorokTestUnit2Copy = prorokTestUnit2;
        CheckRespawn();

        /*    DEBUG    */
        _frameCount += 1;
        if (_frameCount == 30)
        {
            _frameCount = 0;
            //Debug.Log(_score);
            //Debug.Log(_timeOut);
            //Debug.Log(_isDown);
            //Debug.Log(_isColliding);
        }
    }
Exemplo n.º 2
0
    private void Start()
    {
        Application.runInBackground = true;
        _finished   = 0;
        _score      = 0;
        _timeOut    = 0;
        _isDown     = 0;
        _currentMap = new MapDatas(SceneManager.GetActiveScene().buildIndex);
        InitRobot();
        if (demoWalk & debugMode)
        {
            InitWalkDemo();
        }
        RefreshMotors();
        RefreshSensorValues();
        _prorokTestUnit2Copy = prorokTestUnit2;
        StartCoroutine(CheckForProgress());
        StartCoroutine(Timer(_currentMap.GetGameDuration()));
        StartCoroutine(CheckIfDown());
        /*    DEBUG    */

        _frameCount = 0;
    }