29 lines
774 B
C#
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();
|
|
}
|
|
}
|
|
} |