Beispiel #1
0
        public Level(ICore core)
        {
            if (core == null)
            {
                throw new ArgumentNullException(nameof(core));
            }

            _core = core;
            _core.Layers.Reset(NonNullList.Of(0));
            _core.ActivateActions();
            _resourcePool = new ResourcePool();
        }
Beispiel #2
0
        public Zoom(ICore core)
        {
            if (core == null)
            {
                throw new ArgumentNullException(nameof(core));
            }

            _core = core;
            _core.Layers.Reset(NonNullList.Of(0));
            _core.DeactivateActions();
            _core.ActivateActions(NonNullList.Of(
                                      DefaultActions.Up,
                                      DefaultActions.Left,
                                      DefaultActions.Down,
                                      DefaultActions.Button1
                                      ));

            _resourcePool = new ResourcePool();
        }
Beispiel #3
0
        public RayCaster(ICore core)
        {
            if (core == null)
            {
                throw new ArgumentNullException(nameof(core));
            }

            _core = core;
            _core.Layers.Reset(NonNullList.Of(0));
            _core.ActivateActions();


            _player = new Player(15.3, -1.2, Math.PI * 0.3);
            _map    = new Map(32);

            /*var display = Document.getElementById('display');
             * var controls = new Controls();
             * var camera = new Camera(display, MOBILE ? 160 : 320, 0.8);
             * var loop = new GameLoop();
             *
             * map.randomize();*/

            // taken from https://github.com/hunterloftis/playfuljs-demos/blob/gh-pages/raycaster/index.html
        }