Exemplo n.º 1
0
 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();
            }
        }
    }
Exemplo n.º 3
0
    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);
    }
Exemplo n.º 4
0
 public void SetVM(ViewModel vm1)
 {
     this.vm = vm1;
     Joystick1.SetVM(vm);
     DataContext = vm;
 }