protected void SetPlayerCarSettings(IGameWindow gameWindow) { _playerCar = _carConstructor.CreatePlayerCar(_playerManager.selectedCar, _playerManager.selectedCar.current_color); Assert.AreNotEqual(null, _playerCar); _playerCar.SetColorInGame(_playerManager.selectedCar.current_color); _playerCar.transform.tag = "Player"; _playerCar.Transform.position = new Vector3(0f, 3f, 2f); _playerManager.PlayerCar = _playerCar; //_playerCar.SetValue_RaceTimer(gameWindow.Get_TextRaceTimer()); }
// protected virtual void OnPlayerFinishClickForVelocity() //{ // byte[] bytesToSend; // using (MemoryStream memStream = new MemoryStream(_rawData.Count * 36)) // { // foreach (var val in _rawData) // { // memStream.Write(BitConverter.GetBytes(val.MoveParam.x), 0, 4); // memStream.Write(BitConverter.GetBytes(val.MoveParam.y), 0, 4); // memStream.Write(BitConverter.GetBytes(val.MoveParam.z), 0, 4); // memStream.Write(BitConverter.GetBytes(val.VelocityParam.x), 0, 4); // memStream.Write(BitConverter.GetBytes(val.VelocityParam.y), 0, 4); // memStream.Write(BitConverter.GetBytes(val.VelocityParam.z), 0, 4); // memStream.Write(BitConverter.GetBytes(val.AngularVelocityParam.x), 0, 4); // memStream.Write(BitConverter.GetBytes(val.AngularVelocityParam.y), 0, 4); // memStream.Write(BitConverter.GetBytes(val.AngularVelocityParam.z), 0, 4); // } // bytesToSend = memStream.GetBuffer(); // } // if (bytesToSend != null) // { // _gameData.recordData = Convert.ToBase64String(bytesToSend); // } // _gameManager.Finish(); //} //protected virtual void OnPlayerFinishClickForInput() //{ // byte[] bytesToSend; // using (MemoryStream memStream = new MemoryStream(InputData.Count * 36)) // { // foreach (var val in InputData) // { // memStream.Write(BitConverter.GetBytes(val.steerInput), 0, 4); // memStream.Write(BitConverter.GetBytes(val.throttleInput), 0, 4); // memStream.Write(BitConverter.GetBytes(val.brakeInput), 0, 4); // memStream.Write(BitConverter.GetBytes(val.handbrakeInput), 0, 4); // memStream.Write(BitConverter.GetBytes(val.NitroPower), 0, 4); // memStream.Write(BitConverter.GetBytes(val.RotateAndroid), 0, 4); // memStream.Write(BitConverter.GetBytes(val.Sin), 0, 8); // memStream.Write(BitConverter.GetBytes(val.Cos), 0, 8); // } // bytesToSend = memStream.GetBuffer(); // } // if (bytesToSend != null) // { // _gameData.recordData = Convert.ToBase64String(bytesToSend); // } // _gameManager.Finish(); //} protected void SetShadowCarSettings() { _ghostCar = _carConstructor.CreateEnemyCar(_playerManager.selectedCar, _playerManager.selectedCar.current_color); Assert.AreNotEqual(null, _ghostCar); //_shadowCar.transform.tag = "Player"; _ghostCar.SetColorInGame(_playerManager.selectedCar.current_color); _ghostCar.Transform.position = new Vector3(0f, 3f, -2f); _ghostCar.controller.isEnemy = false; _ghostCar.controller.enabled = false; }