/// <summary>
 /// Initializes a new instance of the SiS.Communication.Tcp.ClientContext
 /// </summary>
 public ClientContext()
 {
     ReceiveBuffer       = new RingQueue();
     RecvSpeedController = new SpeedController();
     SendController      = new SpeedController();
     RecvRawMessage      = new TcpRawMessage();
 }
    private void Start()
    {
        speedController = GetComponentInChildren <SpeedController>();
        if (speedController != null)
        {
            speedController.Init(startingSpeed, speedSettings);
        }
#if UNITY_EDITOR
        else
        {
            MissingControllerMessage(typeof(SpeedController).Name);
            return;
        }
#endif

        levelController = GetComponentInChildren <LevelController>();
        if (levelController != null)
        {
            levelController.Init(levelData);
        }
#if UNITY_EDITOR
        else
        {
            MissingControllerMessage(typeof(LevelController).Name);
            return;
        }
#endif
    }
Beispiel #3
0
        private void InitialiseSubControllers(
            SpeedController speedController,
            HotkeyWatcher hotkeyWatcher,
            CardAnimationController cardAnimationController,
            MapController mapController,
            EndGameAnimController endGameAnimController,
            Notifier notifier,
            OptionsPanel optionsPanel)
        {
            orig_InitialiseSubControllers(
                speedController,
                hotkeyWatcher,
                cardAnimationController,
                mapController,
                endGameAnimController,
                notifier,
                optionsPanel);

            if (_defaultMapSprite != null)
            {
                return;
            }

            var image = mapBackground.GetComponent <Image>();

            _defaultMapSprite = image.sprite;
        }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the SiS.Communication.Tcp.ClientContext
 /// </summary>
 public HttpClientContext()
 {
     ReceiveBuffer       = new RingQueue();
     RecvSpeedController = new SpeedController();
     SendController      = new SpeedController();
     SendBuffer          = new DynamicBufferStream();
 }
Beispiel #5
0
 public FanControlHID()
 {
     _speedController = new SpeedController();
     if (!_speedController.Init())
     {
         throw new NotSupportedException("Unable init HID device");
     }
 }
Beispiel #6
0
    // get the speedcontroller script.



    void Start()
    {
        ItemPickPoints = 0;
        itemText.text  = "MIDICHLORIANS : " + ItemPickPoints;                               // set the beginning score.

        livesText.text = "Lives: " + PlayerLives;                                           // set the player lives.
        SC             = GameObject.Find("SpeedManager").GetComponent <SpeedController> (); //find the object with the script.
    }
Beispiel #7
0
 // Start is called before the first frame update
 void Start()
 {
     controller = GetComponent <SpeedController>();
     GameManager.Manager.OnGameOver.AddListener(() =>
     {
         controller.Speed = 0;
     });
 }
Beispiel #8
0
 private void Start()
 {
     platformRigibody = GetComponent <Rigidbody2D>();
     player           = GameObject.FindGameObjectWithTag("Player");
     ChangeState();
     speed = SpeedController.GetSpeed();
     StartCoroutine(DeleteAfterTime(4));
 }
Beispiel #9
0
 private extern void orig_InitialiseSubControllers(
     SpeedController speedController,
     HotkeyWatcher hotkeyWatcher,
     CardAnimationController cardAnimationController,
     MapController mapController,
     EndGameAnimController endGameAnimController,
     Notifier notifier,
     OptionsPanel optionsPanel);
Beispiel #10
0
 void Start()
 {
     Speed           = GameObject.FindObjectOfType <SpeedController>();
     positionLast    = transform.position;
     collision       = false;
     timer           = Timeout;
     checkpointTimer = Timeout;
     cutoutLayer     = LayerMask.NameToLayer("NegativeSpace");
 }
Beispiel #11
0
 void Start()
 {
     if(_instance == null)
     {
         _instance = this;
     }
     else
         Destroy(gameObject);
 }
Beispiel #12
0
    private void Start()
    {
        rb = GetComponent <Rigidbody2D>();

        highscore = GameObject.FindObjectOfType <Highscore>();

        speedController = FindObjectOfType <SpeedController>();
        enemySpeed      = speedController.speed;
    }
Beispiel #13
0
    private void Awake()
    {
        this.sRigidbody                = this.GetComponent <Rigidbody>();
        this.sPathReceiver             = this.GetComponent <PathReceiver>();
        this.sKeyStrokeInputController = this.GetComponent <KeyStrokeInputController>();
        this.sSpeedController          = new SpeedController(this._MaximumSpeed);
#if UNITY_ANDROID
        _RotationSpeed = 80f;
#endif
    }
Beispiel #14
0
 void Start()
 {
     if (UseSeed)
     {
         Random.InitState(Seed);
     }
     Speed    = GameObject.FindObjectOfType <SpeedController>();
     Distance = Mathf.Abs(Height / 2f);
     BaseTime = Time.time;
 }
Beispiel #15
0
    public void CheckMoveSpeed()
    {
        speedCon        = CameraRig.GetComponent <SpeedController>();
        speed           = speedCon.speed;
        SpeedMultiplier = speedCon.SpeedMultiplier;
        PlayerSpeed     = speed;



        StageSpeed = SpeedMultiplier * PlayerSpeed;
    }
Beispiel #16
0
        public void Run()
        {
            var speedController = new SpeedController(Pca9685PwmController.Default);
            var aircraft        = new Quadcopter(speedController);

            WindowsPilot.Create(
                aircraft,
                L3gd20hGyroscope.Default,
                Lsm303dAccelerometer.Default,
                Lsm303dMagnetometer.Default,
                FlightController.FromGamepad(LogitechF710Gamepad.Default),
                thrustMax: 0.8d,
                angularPositionPitchMax: AngleConvert.ToRadians(15d),
                angularPositionRollMax: AngleConvert.ToRadians(15d),
                angularVelocityYawMax: AngleConvert.ToRadians(90 /*dps*/));
        }
    // Start is called before the first frame update
    void Start()
    {
        objectPoolContainer = GameObject.Find("ObjectPool");
        objectPool          = objectPoolContainer.GetComponent <ObjectPool>();

        textUI           = GameObject.Find("TextInformation");
        textUIController = textUI.GetComponent <TextController>();

        speedTextUI           = GameObject.Find("SpeedText");
        speedTextUIController = speedTextUI.GetComponent <SpeedController>();

        finishedDoors   = new List <Door>();
        finishedWindows = new List <Window>();

        allDoors   = new List <Door>();
        allWindows = new List <Window>();
    }
Beispiel #18
0
    void Awake()
    {
        easy = GameObject.FindGameObjectsWithTag("Parameter");
        Debug.Log(easy);

        para   = CameraRig.GetComponent <SpeedController>();
        iseasy = easy[0].GetComponent <EasyModeHandle>().easymode;
        if (iseasy)
        {
            para.SpeedMultiplier = 0.02f;
            para.speedUpStep     = 0.002f;
            para.setEasyMode(iseasy);
        }
        else
        {
            para.SpeedMultiplier = 0.03f;
            para.speedUpStep     = 0.005f;
        }
    }
Beispiel #19
0
    public void CheckMoveSpeed()
    {
        speedCon = CameraRig.GetComponent <SpeedController>();

        speed           = speedCon.speed;
        SwitchStageCase = speedCon.currentLevel;

        SpeedMultiplier = speedCon.SpeedMultiplier;
        PlayerSpeed     = speed;

        isEasy = speedCon.easymode;

        if (isEasy)
        {
            SwitchStageCase = SwitchStageCase + 2;
        }


        StageSpeed = SpeedMultiplier * PlayerSpeed;
    }
Beispiel #20
0
    private void Update()
    {
        SpeedController.RunUpdate();

        TargetPosition = MovementStateMachine.PlayerDirection.x;

        movementSM.CurrentState.HandleState();
        movementSM.CurrentState.HandleLogic();

        if (debugger.showDebug)
        {
            debugger.GameOver     = ScoreManager.GameOver;
            debugger.PlayTime     = SpeedController.playTime;
            debugger.State        = movementSM.GetState();
            debugger.Position     = transform.position;
            debugger.Speed        = SpeedController.Speed;
            debugger.PoletScore   = ScoreManager.Score;
            debugger.Lifes        = ScoreManager.Life;
            debugger.VulnerableCD = ScoreManager.VulnerableCoolDown;
        }
    }
Beispiel #21
0
 public static float GetCharacterSpeed(float pathLength)
 {
     return((pathLength * WORLD_SCALE) * SpeedController.GetMovementSpeed());
 }
Beispiel #22
0
        public override void OnInspectorGUI()
        {
            //DrawDefaultInspector();
            serializedObject.Update();

            SpeedController sc = (SpeedController)target;

            if (sc.transform.GetComponent <MovementController>() == null)
            {
                GUI.contentColor = Color.red;
                EditorGUILayout.LabelField("There must be a MovementController Script added!", EditorStyles.whiteLabel);
                GUI.contentColor = Color.white;
            }
            else
            {
                EditorGUI.BeginDisabledGroup(sc.interval == true);
                if (GUILayout.Button("Toggle"))
                {
                    sc.toggle();
                }
                EditorGUI.EndDisabledGroup();

                EditorGUILayout.PropertyField(neutralSpeedProp, new GUIContent("Neutral Speed"));

                EditorGUILayout.PropertyField(targetSpeedProp, new GUIContent("Target Speed"));

                if (!tweenIndexProp.hasMultipleDifferentValues)
                {
                    tweenIndexProp.intValue = EditorGUILayout.Popup("Tween Type", tweenIndexProp.intValue, tweenOptions);
                }
                else
                {
                    EditorGUILayout.LabelField("Selection contains different Tween Types!");
                }


                if (tweenIndexProp.intValue != 0)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(tweenDurationProp, new GUIContent("Tween Duration"));
                    if (tweenDurationProp.floatValue < 0)
                    {
                        tweenDurationProp.floatValue = 0;
                    }
                    EditorGUI.indentLevel--;
                }

                EditorGUILayout.PropertyField(intervalProp, new GUIContent("Interval"));
                if (intervalProp.boolValue)
                {
                    EditorGUI.indentLevel++;
                    EditorGUILayout.PropertyField(intervalTimeProp, new GUIContent("Neutral Duration"));
                    if (intervalTimeProp.floatValue < 0)
                    {
                        intervalTimeProp.floatValue = 0;
                    }
                    EditorGUILayout.PropertyField(durationProp, new GUIContent("Target Duration"));
                    if (durationProp.floatValue < 0)
                    {
                        durationProp.floatValue = 0;
                    }
                    EditorGUI.indentLevel--;
                }
            }

            serializedObject.ApplyModifiedProperties();
        }
 // implementation
 private void UpdateText()
 {
     _buttonText.text = _textPrefix + SpeedController.GetMovementSpeedText();
 }
Beispiel #24
0
 void Update()
 {
     if (isRunning)
     {
         if (currentLevel == Level.left)
         {
             scoreCounter.SetActive(false);
             tutorialText.GetComponent <Text> ().text = "Tap and hold left side of screen to move left";
             if (input.MappedInput == InputManager.InputType.Left)
             {
                 touchTime += Time.deltaTime;
                 if (touchTime > holdTime)
                 {
                     currentLevel = Level.right;
                     touchTime    = 0;
                 }
             }
             else
             {
                 touchTime = 0;
             }
         }
         else if (currentLevel == Level.right)
         {
             tutorialText.GetComponent <Text> ().text = "Tap and hold right side of screen to move right";
             if (input.MappedInput == InputManager.InputType.Right)
             {
                 touchTime += Time.deltaTime;
                 if (touchTime > holdTime)
                 {
                     currentLevel = Level.both;
                     touchTime    = 0;
                 }
             }
             else
             {
                 touchTime = 0;
             }
         }
         else if (currentLevel == Level.both)
         {
             tutorialText.GetComponent <Text> ().text = "Tap and hold both sides of screen to split";
             if (input.MappedInput == InputManager.InputType.Both)
             {
                 touchTime += Time.deltaTime;
                 if (touchTime > holdTime)
                 {
                     currentLevel = Level.go;
                     touchTime    = 0;
                 }
             }
             else
             {
                 touchTime = 0;
             }
         }
         else if (currentLevel == Level.go)
         {
             touchTime += Time.deltaTime;
             if (touchTime < 1.5f * holdTime)
             {
                 tutorialText.GetComponent <Text> ().text = "You Rock!";
             }
             else if (touchTime > 1.5f * holdTime && touchTime < 2 * holdTime)
             {
                 tutorialText.GetComponent <Text> ().text = "";
             }
             else if (touchTime > 2 * holdTime)
             {
                 tutorialText.GetComponent <Text> ().text = "";
                 currentLevel = Level.none;
                 touchTime    = 0;
             }
         }
         else if (currentLevel == Level.none && isRunning == true)
         {
             tutorialText.GetComponent <Text> ().text = "";
             isRunning = false;
             scoreCounter.SetActive(true);
             PlayerPrefs.SetInt("Tutorial", 0);
             SpeedController.Reset();
             print("count me");
             generator.StartObstacleGeneration();
         }
     }
 }
 // interface
 public void ChangeSpeed()
 {
     SpeedController.ChangeSpeed();
     UpdateText();
 }
Beispiel #26
0
 void IncreaseScore(float step)
 {
     score += step;
     SpeedController.IncreaseSpeed(step);
 }
Beispiel #27
0
 void Start()
 {
     speedController = GetComponent <SpeedController>();
     positions       = GetComponent <PositionsController>();
 }
Beispiel #28
0
 void Start()
 {
     Speed = GameObject.FindObjectOfType <SpeedController>();
 }
 public void update()
 {
     this.Speed = SpeedController.easeInQuint(Mathf.Min(Time.timeSinceLevelLoad - this.nStartTime, this.nDuration), this.nReferenceSpeed * .25f, this.nReferenceSpeed * .75f, this.nDuration);
 }
Beispiel #30
0
 // Start is called before the first frame update
 void Start()
 {
     speedController = FindObjectOfType <SpeedController>();
     speed           = speedController.GetBulletSpeed();
     rb.velocity     = transform.up * speed;
 }
Beispiel #31
0
 // Start is called before the first frame update
 void Awake()
 {
     speedController = FindObjectOfType <SpeedController>();
     touchHandler    = FindObjectOfType <TouchHandler>();
     mainCamera      = FindObjectOfType <CameraFollow>();
 }