Пример #1
0
 public DebugCamera(InputComponent input)
     : base()
 {
     speed = MinSpeed = 3f;
     MaxSpeed = 50f;
     this.input = input;
 }
Пример #2
0
        public ThirdPersonCamera(ITargetNode targetNode, InputComponent input)
            : base()
        {
            this.TargetNode = targetNode;
            this.input = input;

            // Constants

            Zoom = 330;
            RotationSpeed = .05f;
            RotationMagnet = .075f;
            TranslationMagnet = .98f;

            //lookUpOffset = Zoom * new Vector3(0, .275f, 0);
            //translationOffset = Zoom * new Vector3(0, .2f, 1);

            cameraRotation = TargetNode.RotationMatrix;
            cameraTranslation = TargetNode.TranslationMatrix;

            Position = Vector3.Transform(translationOffset, cameraRotation * cameraTranslation);
            View = Matrix.CreateLookAt(Position,
                Vector3.Transform(lookUpOffset, cameraRotation * cameraTranslation), Vector3.Up);
        }
        public ThirdPersonCamera(ITargetNode targetNode, InputComponent input)
            : base()
        {
            this.TargetNode = targetNode;
            this.input      = input;

            // Constants

            Zoom              = 330;
            RotationSpeed     = .05f;
            RotationMagnet    = .075f;
            TranslationMagnet = .98f;

            //lookUpOffset = Zoom * new Vector3(0, .275f, 0);
            //translationOffset = Zoom * new Vector3(0, .2f, 1);

            cameraRotation    = TargetNode.RotationMatrix;
            cameraTranslation = TargetNode.TranslationMatrix;

            Position = Vector3.Transform(translationOffset, cameraRotation * cameraTranslation);
            View     = Matrix.CreateLookAt(Position,
                                           Vector3.Transform(lookUpOffset, cameraRotation * cameraTranslation), Vector3.Up);
        }
 public DebugCamera(InputComponent input) : base()
 {
     speed      = MinSpeed = 3f;
     MaxSpeed   = 50f;
     this.input = input;
 }
 public DebugCamera(Vector3 position, InputComponent input) : this(input)
 {
     this.Position = position;
 }
Пример #6
0
 public CarControlComponent(GameManager game)
     : base(game)
 {
     this.input = game.GetService<InputComponent>();
     this.simulationStrategy = new DeadReckoningStrategy(Game);
 }
Пример #7
0
 public CarControlComponent(GameManager game)
     : base(game)
 {
     this.input = game.GetService <InputComponent>();
     this.simulationStrategy = new DeadReckoningStrategy(Game);
 }
Пример #8
0
 public DebugCamera(Vector3 position, InputComponent input)
     : this(input)
 {
     this.Position = position;
 }