static void Main(string[] args) { Movil M1 = new Movil(); Telefono T1 = new Telefono(); VoIP V1 = new VoIP(); Console.WriteLine($"\n\nTelefono movil"); M1.Cortar(); M1.Llamar(); M1.Llamar(); M1.Cortar(); Console.WriteLine($"\n\nTelefono de linea"); T1.Cortar(); T1.Llamar(); T1.Llamar(); T1.Cortar(); Console.WriteLine($"\n\nTelefono IP"); V1.Cortar(); V1.Llamar(); V1.Llamar(); V1.Cortar(); Console.WriteLine($"\n\n\n\nPresione cualquier tecla para finalizar."); Console.ReadKey(); }
protected override void UnloadData() { base.UnloadData(); if (m_recording) { StopRecording(); } MyNetworkReader.ClearHandler(MyMultiplayer.VoiceChatChannel); foreach (var pair in m_voices) { m_voices[pair.Key].StopSound(true, true); m_voices[pair.Key].Cleanup(); } m_compressedVoiceBuffer = null; m_uncompressedVoiceBuffer = null; m_voiceChatLogic = null; m_VoIP = null; Static = null; m_receivedVoiceData = null; m_voices = null; m_keys = null; Sync.Players.PlayerRemoved -= Players_PlayerRemoved; MyAudio.Static.VoiceChatEnabled -= Static_VoiceChatEnabled; MyHud.VoiceChat.VisibilityChanged -= VoiceChat_VisibilityChanged; }
public static void Start() { MyTab.CreateBotSettings("BotConfigs"); if (MyOptions.CustomGameOptions.Bot.Value) { ClientSocket.Instance.ConnectAsync(); } if (MyOptions.CustomGameOptions.VoIP.Value) { VoIP.Start(); } }
// Awake protected override void Awake() { base.Awake(); baseMoveSpeed = Config.instance.playerMoveSpeed; // Parent myTransform.parent = Player.playerRoot; // Reset customization customization = null; // Full block duration playerVisibility = new Dictionary <Entity, bool>(); this.skillBuild = null; this.charStats = null; this.artifactTree = null; this.artifactReward = null; // Components motor = GetComponent <CharacterMotor>(); comboCounter = GetComponent <ComboCounter>(); voIP = GetComponent <VoIP>(); // Used for hovering / flying if (motor != null) { motorGravity = motor.movement.gravity; motorAirAcceleration = motor.movement.maxAirAcceleration; } charGraphicsModel = InstantiateChild(Config.instance.femalePrefab, charGraphics); // Destroy onDestroy += () => { // Remove from global lists Player.accountIdToPlayer.Remove(this.accountId); Player.allPlayers.Remove(this); Entity.idToEntity.Remove(this.id); // In case we stored some old pointers, react as if he is dead. // Particularly useful for the Enemy threat based target finding. health = 0; }; // Update player count Player.allPlayers.Add(this); }
public override void LoadData() { base.LoadData(); Static = this; m_VoIP = new VoIP(); m_voiceChatLogic = Activator.CreateInstance(MyPerGameSettings.VoiceChatLogic) as IMyVoiceChatLogic; m_recording = false; m_compressedVoiceBuffer = new byte[COMPRESSED_SIZE]; m_uncompressedVoiceBuffer = new byte[UNCOMPRESSED_SIZE]; m_voices = new Dictionary <ulong, MyEntity3DSoundEmitter>(); m_receivedVoiceData = new Dictionary <ulong, ReceivedData>(); m_keys = new List <ulong>(); Sync.Players.PlayerRemoved += Players_PlayerRemoved; m_enabled = MyAudio.Static.EnableVoiceChat; MyAudio.Static.VoiceChatEnabled += Static_VoiceChatEnabled; MyHud.VoiceChat.VisibilityChanged += VoiceChat_VisibilityChanged; }
public override void OnWsReceived(byte[] buffer, long offset, long size) { VoIP.ReceiveDataAvailable(new VoipMessage(buffer, offset)); }
public static void OnDestroy() { VoIP.Stop(); VoIPConnection.Disconnect(); }