public MainWindow() { InitializeComponent(); myStageControl.Initialize(); _myStage = myStageControl.Stage; this._MoveStage += new MoveStageEx(MoveStage); this._StopStage += new StopStageEx(StopStage); this._Puzzle = new DotPuzzle(); this._Puzzle.Dots.Add(new Point(200, 300)); // this._Puzzle.Dots.Add(new Point(1600, 300)); //this._Puzzle.Dots.Add(new Point(1650, 400)); //this._Puzzle.Dots.Add(new Point(1600, 500)); //this._Puzzle.Dots.Add(new Point(1000, 500)); //this._Puzzle.Dots.Add(new Point(1000, 600)); //this._Puzzle.Dots.Add(new Point(1200, 700)); //this._Puzzle.Dots.Add(new Point(1150, 800)); //this._Puzzle.Dots.Add(new Point(750, 800)); //this._Puzzle.Dots.Add(new Point(700, 700)); //this._Puzzle.Dots.Add(new Point(900, 600)); //this._Puzzle.Dots.Add(new Point(900, 500)); //this._Puzzle.Dots.Add(new Point(200, 500)); //this._Puzzle.Dots.Add(new Point(150, 400)); this._PuzzleDotIndex = -1; this.Loaded += (s,e) => { KinectSensor.KinectSensors.StatusChanged += KinectSensors_StatusChanged; this.KinectDevice = KinectSensor.KinectSensors.FirstOrDefault(x => x.Status == KinectStatus.Connected); DrawPuzzle(this._Puzzle); }; }
static void Main(string[] args) { CStage _myStage = new CStage(); StageControl myStageControl = new StageControl(); myStageControl.Initialize(); _myStage = myStageControl.Stage; CmillCmdCtrl myMillCtrl = new CmillCmdCtrl(); // double x, y, z; // _myStage.GetPos(out x, out y, out z); CPath _myPath = new CPath(); _myPath.SetPathParams(60, //path frequency = 30 Hz 75, //Store a minimum of 45 points in the path point buffer 15000.0, //X scale - 20000.0 counts per inch 15000.0, //Y scale - 20000.0 counts per inch 15000.0, //Z scale - 1.0 counts per inch - not used 0.175); _myPath.SetOrigin(0.0, 0.0, 0.0); _myPath.SetFeedrate(0.175); _myPath.SetTangentTolerance((float)10.0); myMillCtrl.ProcessGCode("C:\\Program Files (x86)\\Mill1A\\input\\CircleAtOrigin.nc"); myMillCtrl.RunGCode(); }
public void Initialize() { myStage = new CStage("COM4:"); myStage.Rotate(180.0); SetMotionGains(); SetSpeedAndAcceleration(); }
public void Refresh(string[] arguments) { CStage stage = App.Util.SceneManager.CurrentScene as CStage; SceneManager.CurrentScene.StartCoroutine(stage.ReLoad(() => { LSharpScript.Instance.Analysis(); })); }
public void Initialize() { myStage = new CStage("COM4:"); myStage.Rotate(180.0); SetMotionGains(); SetSpeedAndAcceleration(); InitializeCoordMotion(); }
public void StageLoadData() { pStageNumberArray = ES3.Load <int[]>("StageArray", "Stage.es3"); nCurrentIndex = ES3.Load <int>("CurrentIndex", "Stage.es3"); middlebossIndex = ES3.Load <int>("MiddleBossIndex", "Stage.es3"); this.nMiddlebossStageIndex = ES3.Load <int>("MiddleBossStageIndex", "Stage.es3"); this.nShopStageIndex = ES3.Load <int>("ShopStageIndex", "Stage.es3"); if (this.nMiddlebossStageIndex == -1) { this.nMiddlebossStageIndex = this.pStageNumberArray.Length / 2; } if (this.nShopStageIndex == -1) { this.nShopStageIndex = this.nMiddlebossStageIndex - 1; } Debug.Log(nCurrentIndex); nCurrentIndex--; if (nCurrentIndex < 0) { nCurrentIndex = 0; } stageList.Insert(this.nMiddlebossStageIndex, middleBossStageList[this.middlebossIndex]); stageList.Insert(this.nShopStageIndex, shopStage); for (int i = 0; i < stageList.Count; i++) { if (stageList[i] == this.middleBossStageList[this.middlebossIndex]) { var temp = stageList[i]; stageList[i] = stageList[this.nMiddlebossStageIndex]; stageList[nMiddlebossStageIndex] = temp; break; } if (stageList[i] == this.shopStage) { var temp = stageList[i]; stageList[i] = stageList[this.nShopStageIndex]; stageList[this.nShopStageIndex] = temp; } } currentStage = stageList[pStageNumberArray[nCurrentIndex]]; var stageObj = CStageManager.Instance.GetStageObject(currentStage.name).GetComponent <CStage>(); CStageManager.Instance.CurrentStage = stageObj; CStageManager.Instance.CurrentStage.name = currentStage.name; }
public void NotSaveChpaterEnter() { ES3.Save <bool>("IsContinue", true, "Stage.es3"); this.CreateStageArray(); currentStage = stageList[pStageNumberArray[nCurrentIndex]]; this.StageSaveData(); var stageObj = CStageManager.Instance.GetStageObject(currentStage.name).GetComponent <CStage>(); CStageManager.Instance.CurrentStage = stageObj; CStageManager.Instance.CurrentStage.name = currentStage.name; }
// Timer and event public MainWindow() { InitializeComponent(); myStageControl.Initialize(); _myStage = myStageControl.Stage; _JoyStick = new XGamepadDemo.XBoxJoyStick(); _JoyStick.Initialize(0); _JoyStick.Stage = _myStage; timer = new DispatcherTimer(); timer.Interval = new TimeSpan(0, 0, 0, 0, 100); timer.Tick += new EventHandler(OnTick); timer.Start(); }
// Timer and event public MainWindow() { InitializeComponent(); this.Update1 += new Updatedro(UpdateDRO); myStageControl.Initialize(); _myStage = myStageControl.Stage; _JoyStick.Initialize(0); _JoyStick.Stage = _myStage; InitializePath(); _timer = new DispatcherTimer(); _timer.Interval = new TimeSpan(0, 0, 0, 0, 100); _timer.Tick += new EventHandler(OnTick); _timer.Start(); // _timer.Stop(); }
public void MoveStage() { portal.gameObject.SetActive(false); CMerchandiseManager.Instance.NextStage(); if (nCurrentIndex == 0) { player.transform.position = CStageManager.Instance.CurrentStage.StartPos; nCurrentIndex++; } else { if (nCurrentIndex == nMaxStage) { //마지막 스테이지일때 챕터 이동 or 대기실 이동 //대기실 이동이라면 IsContinue False; //클리어한 챕터 데이터 클리어. Debug.Log("챕터 끝"); } else { CStageManager.Instance.PushStageObject(CStageManager.Instance.CurrentStage.name, CStageManager.Instance.CurrentStage.gameObject); CStageManager.Instance.ReUseStageSetting(); currentStage = stageList[pStageNumberArray[nCurrentIndex]]; var stageObj = CStageManager.Instance.GetStageObject(currentStage.name).GetComponent <CStage>(); CStageManager.Instance.CurrentStage = stageObj; CStageManager.Instance.CurrentStage.name = currentStage.name; player.transform.position = CStageManager.Instance.CurrentStage.StartPos; nCurrentIndex++; if (nCurrentIndex == nMaxStage) { portal.bIsFinal = true; } CItemManager.Instance.MoveStageSetting(); } this.StageSaveData(); } Debug.Log(nCurrentIndex); CWeaponManager.Instance.SaveWeapon(); ES3.Save <int>("CurrentIndex", nCurrentIndex, "Stage.es3"); }
private void Form1_Load(object sender, EventArgs e) { myStage = new CStage("COM4:"); InitializeCoordMotion(); SetMotionGains(); SetSpeedAndAcceleration(); }