protected override void Initialize() { SLText = new Text(GraphicsDevice, Services, SLConfig["content"], "Arial"); Timer = new SLTimer(); Timer.Start(); Input = new SLInput(); BarPara bpara = BarPara.Default; bpara.width = 3.5f; bpara.height = 0.7f; bpara.BasePara.orientation = 90.0f; Bar = new Bar(GraphicsDevice, bpara); GratingPara gpara = GratingPara.Default; gpara.BasePara.diameter = 2.0f; gpara.sf = 0.8f; gpara.tf = 3.0f; Grating = new Grating(GraphicsDevice, Services, SLConfig["content"], gpara); GratingType = Grating.Para.gratingtype; GratingShape = Grating.Para.shape; GratingMask = Grating.Para.maskpara.masktype; Cross = new Primitive(GraphicsDevice, PrimitivePara.Cross(1.0f, Color.Black, Vector3.Zero)); Bgcolor = Color.DimGray; CurrentSti = VSType.Bar; HelpText = 0; }
/// <summary> /// Set SLGame State /// </summary> /// <param name="isshowcursor"></param> /// <param name="issizable"></param> public void SetSLGame(bool isshowcursor, bool issizable) { if (config == null) { config = new AssemblySettings(Assembly.GetAssembly(typeof(AssemblySettings))); } if (gdm == null) { gdm = new GraphicsDeviceManager(this); pp = new PresentationParameters(); input = new SLInput(); freecamera = new SLFreeCamera(); Content.RootDirectory = config["content"]; gdm.PreparingDeviceSettings += new EventHandler <PreparingDeviceSettingsEventArgs>(gdm_PreparingDeviceSettings); } this.IsMouseVisible = isshowcursor; this.Window.AllowUserResizing = issizable; }
/// <summary> /// Update Camera According to User Input /// </summary> /// <param name="input"></param> public void Update(SLInput input) { }