public void InitEditor(GraphicsDevice gd, IServiceProvider gs, string platname) { Content = new ContentManager(gs); Content.RootDirectory = "Content"; InitializeEditor(gd); LoadContent(); platformer = new PLATFORMER(p, this, platname); platformer.Initialize(); platformer.CallLoadContent(); Components.Add(platformer); p.state.instance = GAMESTATE.ENUM.platformer; platformer.p.camera.state = CAMERA.STATE.free; }
protected override void Update(GameTime gameTime) { if (p.state.instance == GAMESTATE.ENUM.quit) Exit(); if (p.state.instance == GAMESTATE.ENUM.newplatformer) { if (platformer != null) Components.Remove(platformer); platformer = new PLATFORMER(p, this, "platInit1"); Components.Add(platformer); p.state.instance = GAMESTATE.ENUM.platformer; } p.time.Update((float)gameTime.ElapsedGameTime.TotalSeconds); p.input.PreInput(); fps.Update(p.time.dt); base.Update(gameTime); p.input.PostInput(); }