public MainWindow() { InitializeComponent(); model = new MyFlightgearMonitorModel(new MyTelnetClient()); vm = new MainWindowViewModel(model); ControlBar1.HookVM(model); GraphsView1.HookVM(model); FlightDetails1.HookVM(model); Joystick1.HookVM(model); DataContext = vm; main_window.Show(); }
public override void Start() { base.Start(); // Check if Joystick exists if (Input.GetJoystickNames().Length > 0) { if (!switchControls) { connectedController = new Joystick2(); } else { connectedController = new Joystick1(); } } }
public override void Start() { base.Start(); CalculateRayCastPoints(); gravity = (2 * jumpHeight) / Mathf.Pow(timeToJumpApex, 2) * 0.2f; jumpVelocity = Mathf.Abs(gravity) * timeToJumpApex; scale = transform.localScale; // Check if Joystick exists if (Input.GetJoystickNames().Length > 0) { if (!switchControls) { connectedController = new Joystick1(); } else { connectedController = new Joystick2(); } } footStepInstance = FMODUnity.RuntimeManager.CreateInstance(footStepEvent); }
public void SetVM(ViewModel vm1) { this.vm = vm1; Joystick1.SetVM(vm); DataContext = vm; }