Наследование: IDisposable
Пример #1
0
 public AutoPositionCamera()
 {
     Drawing.OnDraw += Draw;
     EloBuddy.Game.OnUpdate += OnUpdate;
     CameraState = new CameraState();
     FocusPoint = Vector2.Zero;
 }
Пример #2
0
 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;
 }
Пример #3
0
 private static void SetMoveStates(Vector2 end)
 {
     BeforeMoveState = new CameraState();
     BeforeMoveState.Set();
     AfterMoveState = new CameraState(BeforeMoveState.YawPitch, end, BeforeMoveState.Zoom);
 }
Пример #4
0
 private static void OnLoad(EventArgs args)
 {
     DefaultCameraState = new CameraState();
     LoadMenu();
 }
Пример #5
0
 public void Clear()
 {
     _oldState.Set();
     _oldState.Dispose();
     _oldState = null;
 }
Пример #6
0
 public Spectator()
 {
     CameraState = new CameraState();
     EloBuddy.Game.OnUpdate += Game_OnUpdate;
     Drawing.OnDraw += Drawing_OnDraw;
 }
Пример #7
0
 private void MoveCamera()
 {
     CameraState = new CameraState {Position = Player.Instance.Position.To2D()};
     CameraState.Set();
 }