Esempio n. 1
0
 public static void LoadSettings()
 {
     musicOn  = Convert.ToBoolean(PlayerPrefs.GetInt("musicOn", 0));
     soundOn  = Convert.ToBoolean(PlayerPrefs.GetInt("soundOn", 0));
     language = (LanguageConfiguration)PlayerPrefs.GetInt("language", 0);
     graphic  = (GraphicConfiguration)PlayerPrefs.GetInt("graphic", 0);
 }
Esempio n. 2
0
        public void Init()
        {
            view = A.Fake <FPSCounterComponent.IFPSCounterComponentView>();
            A.CallTo(() => view.getSizeFromString(A <string> .Ignored)).Returns(textSize);

            graphicConf       = new GraphicConfiguration();
            graphicConf.Width = 100;

            presenter = new FPSCounterComponent(view, graphicConf);
            presenter.Update(new GameTime()); // update first time as this is counted as a second, so the fps are now 1.
        }
Esempio n. 3
0
        public UnknownProjectGame(Camera cam, GraphicConfiguration graficConf, ComponentCollection collection, FPSCounterComponent fpsComponent, DesertMapComponent map)
        {
            this.collection = collection;
            this.graficConf = graficConf;
            graphics        = new GraphicsDeviceManager(this);
            this.graphics.PreferredBackBufferWidth  = 1280;
            this.graphics.PreferredBackBufferHeight = 720;

            IsFixedTimeStep = false;
            graphics.SynchronizeWithVerticalRetrace = false;
            Content.RootDirectory = "Content";
            collection.Add(fpsComponent);
            collection.Add(map);
            this.cam = cam;
        }
Esempio n. 4
0
 public DesertMapComponent(Func <PartMapComponent> partMapProvider, Camera cam, GraphicConfiguration graphic) : base(partMapProvider, cam, graphic)
 {
     MapNames = new String[1, 1] {
         { "test/desert2" }
     };
 }
 public MapComponent(Func <PartMapComponent> partMapProvider, Camera cam, GraphicConfiguration graphic)
 {
     this.graphic         = graphic;
     this.cam             = cam;
     this.partMapProvider = partMapProvider;
 }
 public FPSCounterComponent(IFPSCounterComponentView view, GraphicConfiguration graphicConf)
 {
     this.graphicConf = graphicConf;
     this.view        = view;
     view.SetPresenter(this);
 }