public ComponentController(IExecutionService executionService, IDashboardService dashboardService, IMemoryCache memoryCache, AutoReloader autoReloader) : base(memoryCache) { _executionService = executionService; _dashboardService = dashboardService; _autoReloader = autoReloader; _memoryCache = memoryCache; }
public ComponentController(IExecutionService executionService, IDashboardService dashboardService, IMemoryCache memoryCache, AutoReloader autoReloader, StateRequestService stateRequestService) { _executionService = executionService; _dashboardService = dashboardService; _autoReloader = autoReloader; _memoryCache = memoryCache; _stateRequestService = stateRequestService; }
protected override void Awake() { base.Awake(); playerController = FindObjectOfType <NewController>(); playerTransform = GameObject.Find("LocalPlayer").transform; playerCamera = Camera.main.GetComponent <NewTPSCamera>(); UiSwitchDelay = WeaponSwitchDelay * 0.5f; reloader = playerTransform.gameObject.AddComponent <AutoReloader>(); reloader.SetWeapon(this); reloader.SetTimer(10.0f); }
public MainForm() { InitializeComponent(); InitializeCommands(); if (Core.UseVeldrid) { Viewport = new VeldridViewport { ID = "viewport" }; } else { Viewport = new OpenGLViewport { ID = "viewport" }; } BackEnd = Viewport.BackEnd; BackEnd.ProgressUpdated += ProgressReported; foreach ((Control Control, string Name, Action <View> SetUp)view in Viewport.Views.Values) { if (view.Control is View v) { Settings.Updatables.Add(v); v.UpdateFromSettings(Settings); } } ButtonMenuItem viewMenu = Menu.Items.GetSubmenu("View"); foreach (KeyValuePair <int, Command> command in Viewport.ViewCommands) { viewMenu.Items.Insert(command.Key, command.Value); } viewMenu.Items.Insert(Viewport.ViewCommands.Count, new SeparatorMenuItem()); var bottomBar = new TableLayout(2, 1); bottomBar.Add(StatusDisplay, 0, 0, true, true); bottomBar.Add(ProgressBar, 1, 0, true, true); var table = new TableLayout(1, 2); table.Add(Viewport, 0, 0, true, true); table.Add(bottomBar, 0, 1, true, false); Content = table; ProgressClearClock.Elapsed += (sender, e) => { ProgressClearClock.Stop(); StatusDisplay.Text = ""; ProgressBar.Value = 0; }; Shown += SetDefaultView; MapReloader = new AutoReloader((f) => ReloadMap(f)); }