Beispiel #1
0
        public ModelViewerScene()
        {
            UpdateState = UpdateStateInit;
            DrawState = DrawStateInit;

            Name = "ModelViewer";

            cameraUpdater = new ViewerCameraUpdater(Camera, InputAccessor.GetController(ControllerLabel.Main))
            {
                InitRotX = -MathUtil.PiOver4,
                InitRotY = MathUtil.PiOver4,
                InitEyeZ = 30.0f,
                //InitPan = Vector3.Up * 6.0f,
                MaxEyeZ = 200.0f,
                MinEyeZ = 1.0f,
                EyeZInterval = 0.05f,
                PanInterval = 0.2f,
                EnableCameraKey = false,
                EnablePan = true,
            };

            debugMenu = new DebugMenu("ModelViewerMenu");
            debugMenuUpdater = new DebugMenuUpdater(debugMenu, BooleanDeviceLabel.SceneDebugMenu);
            debugMenuDrawer = new DefaultDebugMenuDrawer();
        }
Beispiel #2
0
        public HomeScene()
        {
            Name = "HomeScene";

            UpdateState = UpdateStateInit;
            DrawState = DrawStateInit;

            debugMenuUpdater = new DebugMenuUpdater(debugMenu, BooleanDeviceLabel.SceneDebugMenu);
        }
Beispiel #3
0
        public RootObject()
        {
            gameController = new MainController(keyboard, mouse);
            debugController = new MainController(keyboard, mouse);

            UpdateState = UpdateStateInit;
            DrawState = DrawStateInit;

            DebugMenuUpdater = new DebugMenuUpdater(DebugMenu, BooleanDeviceLabel.GlobalDebugMenu);
        }
Beispiel #4
0
        public BootScene()
        {
            UpdateState = UpdateStateInit;
            DrawState = DrawStateInit;

            Name = "BootScene";

            debugMenu = new DebugMenu("起動メニュー");
            debugMenuUpdater = new DebugMenuUpdater(debugMenu, BooleanDeviceLabel.SceneDebugMenu);
            debugMenuDrawer = new DefaultDebugMenuDrawer();
        }
Beispiel #5
0
        public MapViewerScene()
        {
            UpdateState = UpdateStateInit;
            DrawState = DrawStateInit;

            Name = "MapViewer";

            cameraUpdater = new ViewerCameraUpdater(Camera, InputAccessor.GetController(ControllerLabel.Main))
            {
                InitRotX = -MathUtil.PiOver4,
                InitRotY = MathUtil.PiOver4,
                InitEyeZ = 3000.0f,
                MaxEyeZ = 5000.0f,
                MinEyeZ = 1.0f,
                EyeZInterval = 1.0f,
                RotInterval = 0.04f,
                PanInterval = 10.0f,
                EnablePan = true,
            };

            debugMenuUpdater = new DebugMenuUpdater(debugMenu, BooleanDeviceLabel.SceneDebugMenu);
        }
Beispiel #6
0
        public DungeonScene()
        {
            UpdateState = UpdateStateInit;
            DrawState = DrawStateInit;

            Name = "DungeonScene";

            DungeonPlayerUpdater.CollisionManager = CollisionManager;
            DungeonPlayerUpdater.Dungeon = Dungeon;
            DungeonPlayerUpdater.Camera = Camera;
            DungeonPlayerUpdater.DecoManager = DecoManager;
            PlayerDrawer.Camera = Camera;

            var EnemyCreator = new Enemy.EnemyCreator()
            {
                UpdaterCreator = () =>
                {
                    return new DungeonEnemyUpdater()
                    {
                        EnemyManager = this.EnemyManager,
                        Player = this.Player,
                        CollisionManager = this.CollisionManager,
                        Camera = this.Camera,
                        DecoManager = this.DecoManager,
                    };
                },
                DrawerCreator = () =>
                {
                    return new EnemyDrawer()
                    {
                        Camera = this.Camera
                    };
                },
            };

            EnemyManager = new Enemy.EnemyManager()
            {
                Creator = EnemyCreator
            };

            var AllyCreator = new Ally.AllyCreator()
            {
                UpdaterCreator = () =>
                {
                    return new DungeonAllyUpdater()
                    {
                        AllyManager = this.AllyManager,
                        Player = this.Player,
                        CollisionManager = this.CollisionManager,
                        Camera = this.Camera,
                        DecoManager = this.DecoManager,
                    };
                },
                DrawerCreator = () =>
                {
                    return new AllyDrawer()
                    {
                        Camera = this.Camera
                    };
                },
            };

            AllyManager = new Ally.AllyManager()
            {
                Creator = AllyCreator
            };

            Dungeon.CollisionManager = CollisionManager;
            DungeonDrawer.Camera = Camera;

            cameraUpdater = new TPSCameraUpdater(Camera, InputAccessor.GetController(ControllerLabel.Main))
            {
                InitRotX = -MathUtil.PiOver4,
                InitRotY = MathUtil.PiOver4,
                InitEyeZ = 40.0f,
                MaxEyeZ = 110.0f,
                MinEyeZ = 40.0f,
                EyeZInterval = 0.2f,
                RotInterval = 0.02f,
                PanInterval = 0.2f,
                MaxRotX = MathUtil.ToRadians(30.0f),
            };

            CameraRayCollision = new CameraRayCollisionInfo()
            {
                Direction = () =>
                {
                    var direction = Camera.At - Camera.Eye;
                    direction.Normalize();
                    return direction;
                },
                Position = () => Camera.Eye,
                Reaction = (id, count, result) => { },
            };

            debugMenuUpdater = new DebugMenuUpdater(debugMenu, BooleanDeviceLabel.SceneDebugMenu);

            Dungeon.Drawable = false;
            CollisionManager.Drawable = true;
        }