Files
XRLib/Assets/Scripts/UVC/TopUI/SimulatorSpeedCommand.cs
UVCLimHun 6b78b68229 merge
merge and property
2025-12-24 17:36:01 +09:00

29 lines
774 B
C#

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<int> _parameter = new List<int> { 1, 2, 3, 5, 10 };
int index = 0;
public SimulatorSpeedCommand(object? parameter = null)
{
//_parameter = parameter as List<int>;
}
public async void Execute(object? parameter = null)
{
if (index++ >= _parameter.Count - 1)
{
index = 0;
}
SimulationConfig.param.speed = _parameter[index];
SimulationSettings.Instance.SetSimulationConfig();
}
}
}