Example #1
0
 private void OnTick(object sender, EventArgs e)
 {
     // Process menus
     UIController.Update();
     KillController.Update();
     VehicleController.Update();
     BlipController.Update();
     UIController.TimerBarPool.Draw();
     if (CameraController.CurrentCamera != null)
     {
         //DebugInfo.Bar1.Text = Math.Round(CameraManager.CurrentCamera.Rotation.X, 2).ToString() + ", " + Math.Round(CameraManager.CurrentCamera.Rotation.Y, 2).ToString() + ", " + Math.Round(CameraManager.CurrentCamera.Rotation.Z, 2).ToString();
         //DebugInfo.Bar2.Text = Math.Round(CameraManager.CurrentCamera.Position.X, 2).ToString() + ", " + Math.Round(CameraManager.CurrentCamera.Position.Y, 2).ToString() + ", " + Math.Round(CameraManager.CurrentCamera.Position.Z, 2).ToString();
     }
 }
Example #2
0
    public Main()
    {
        KeyDown += OnKeyDown;
        KeyUp   += OnKeyUp;
        Tick    += OnTick;

        UIController.Init();
        BlipController.Init();
        Debugger.Init();

        config   = ScriptSettings.Load("scripts\\settings.ini");
        OpenMenu = config.GetValue <Keys>("Options", "OpenMenu", Keys.F7);

        World.DestroyAllCameras();

        KeyDown += (o, e) =>
        {
            if (e.KeyCode == OpenMenu && !UIController.MenuPool.IsAnyMenuOpen())
            {
                UIController.MainMenu.Visible = !UIController.MainMenu.Visible;
            }
        };
    }