예제 #1
0
        public Player(Game game, Model model, InputState input, ChaseCamera camera)
            : base(game)
        {
            this.model = model;
            this.input = input;
            this.camera = camera;
            position = new Vector3(0, 20, 0);
            speed = 0;
            direction = Vector3.UnitZ;
            top = Vector3.UnitY;
            left = Vector3.Cross(top, direction);

            inputMode = InputState.InputMode.Advanced;
        }
예제 #2
0
파일: Game1.cs 프로젝트: sethbattin/dpb2012
        protected override void Initialize()
        {
            camera = new ChaseCamera(
                Vector3.Zero,
                Vector3.UnitZ,
                Vector3.UnitY,
                10,
                GraphicsDevice.DisplayMode.AspectRatio);

            random = new Random();
            input = new InputState(this);
            debug = new DebugInfoWriter(this);
            index1 = debug.AddText("camera info");
            index2 = debug.AddText("camera info");
            index3 = debug.AddText("camera info");
            index4 = debug.AddText("camera info");

            track = new Track();

            Components.Add(input);
            Components.Add(debug);

            base.Initialize();
        }