using Simulator; using System.Collections.Generic; using UnityEngine; using UVC.Network; using UVC.UI.Commands; using Simulator.Config; namespace Simulator.UI.Commands { public class SimulatorSpeedCommand : ICommand { private List _parameter = new List { 1, 2, 3, 5, 10 }; int index = 0; public SimulatorSpeedCommand(object? parameter = null) { //_parameter = parameter as List; } public async void Execute(object? parameter = null) { if (index++ >= _parameter.Count - 1) { index = 0; } SimulationConfig.param.speed = _parameter[index]; SimulationSettings.Instance.SetSimulationConfig(); } } }