상속: 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();
 }