//delegate void InitDelegate(); //void Init() //{ // if (this.InvokeRequired) // this.Invoke(new InitDelegate(_Init)); // else // _Init(); //} void Init(object sender, EventArgs args) { this.scenePattern = Library.GetScenePattern("snptrn0");//new ScenePattern("ScenePattern"); this.scene = (Scene)this.soshiant33Panel.engine.AddChild(this.scenePattern, null); this.scene.رنگ_زمینه = this.BackColor; this.scene.Pause(); //base Plane SpritePattern plane = new SpritePattern("Plane Pattern"); SpriteState state = plane.AddNewState("st0"); state.صورت = "basePlane.x"; state.AddNewKeyFrame(0); Sprite basePlane = (Sprite)scene.AddChild(plane, null); basePlane.مولفه_ها.موقعیت.z = 1000; //Target Sprite this.spritePattern = new SpritePattern("SpritePatern" + patternCounter++.ToString()); this.sprite = (Sprite)this.scene.AddChild(this.spritePattern, null); this.soshiant33Panel.engine.camera.Fly(250); this.soshiant33Panel.engine.camera.Pitch(0.4f); this.soshiant33Panel.engine.camera.Walk(220); this.soshiant33Panel.engine.Resize(this.soshiant33Panel.Width, this.soshiant33Panel.Height); //this.splitContainer2.SplitterDistance = 200; if (this.OnTurnedOn != null) { this.OnTurnedOn(this, null); } }
private void btn_clear_Click(object sender, EventArgs e) { this.scenePattern = Library.GetScenePattern("ScenePattern_" + scenesCounter++.ToString());//new ScenePattern("ScenePattern_" + scenesCounter++.ToString()); this.scene = (Scene)this.s33Panel1.engine.AddChild(this.scenePattern, null); this.scene.رنگ_زمینه = this.BackColor; this.scene.Pause(); //base Plane SpritePattern plane = new SpritePattern("Plane Pattern"); SpriteState state = plane.AddNewState("st0"); state.صورت = "basePlane.x"; state.AddNewKeyFrame(0); basePlane = (Sprite)this.scene.AddChild(plane, null); basePlane.مولفه_ها.موقعیت.z = 1000; s33Panel1_MouseUp(null, null); }