Inheritance: IDisposable
 public AutoPositionCamera()
 {
     Drawing.OnDraw += Draw;
     EloBuddy.Game.OnUpdate += OnUpdate;
     CameraState = new CameraState();
     FocusPoint = Vector2.Zero;
 }
 public void Set(float speed = -1)
 {
     _oldState = new CameraState();
     EloBuddy.Camera.Pitch = Pitch;
     EloBuddy.Camera.Yaw = YawPitch.To2D();
     EloBuddy.Camera.SetZoomDistance(Zoom);
     if(speed > 0)
         CameraMovement.MoveToSmooth(Priority.LowMedium, Position, speed);
     else
         EloBuddy.Camera.ScreenPosition = Position;
 }
 private static void SetMoveStates(Vector2 end)
 {
     BeforeMoveState = new CameraState();
     BeforeMoveState.Set();
     AfterMoveState = new CameraState(BeforeMoveState.YawPitch, end, BeforeMoveState.Zoom);
 }
Exemple #4
0
 private static void OnLoad(EventArgs args)
 {
     DefaultCameraState = new CameraState();
     LoadMenu();
 }
 public void Clear()
 {
     _oldState.Set();
     _oldState.Dispose();
     _oldState = null;
 }
Exemple #6
0
 public Spectator()
 {
     CameraState = new CameraState();
     EloBuddy.Game.OnUpdate += Game_OnUpdate;
     Drawing.OnDraw += Drawing_OnDraw;
 }
 private void MoveCamera()
 {
     CameraState = new CameraState {Position = Player.Instance.Position.To2D()};
     CameraState.Set();
 }