public static bool FindXBox() { if (XBox == null) { XBox = new Xbox(); } if (XBox.Ping() == false) { do { if (AutoConnect) { AsyncConnect(); } else { AsyncConnect(SelectedIP); } Cache.XBoxLocator.ShowDialog(); //Acts as wait if (XBox.Connected) { return(true); } }while (new Settings().ShowDialog() == DialogResult.OK); return(false); } return(true); }
void Start() { cameraMaxDistance = TPS_MAX_DISTANCE; playerScript = player.GetComponent <PlayerMove>(); gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); xBox = gameController.GetComponent <XBox>(); }
public static void SendDirectory(FileInformation dir, string workingDir, StatusChangedHandler statusChanged) { if (FindXBox() == false) { return; } string dirname = Path.GetFileName(dir.Name); if (!XBox.FileExists(Path.Combine(workingDir, dirname))) { XBox.CreateDirectory(Path.Combine(workingDir, dirname)); } foreach (string s in Directory.GetFiles(dir.Name, "*", SearchOption.TopDirectoryOnly)) { FileInformation fi = new FileInformation(); fi.Name = s; SendFile(fi, Path.Combine(workingDir, dirname), statusChanged); } foreach (string s in Directory.GetDirectories(dir.Name, "*", SearchOption.TopDirectoryOnly)) { FileInformation fi = new FileInformation(); fi.Name = s; SendDirectory(fi, Path.Combine(workingDir, dirname), statusChanged); } }
void Start() { audioC = GetComponent <AudioController>(); audioC.BgmSoundPlay(AudioController.Bgm.Title_Bgm); xBox = GetComponent <XBox>(); //選択可能なステージの設定 choiceOkStage = (int)GameController.clearNumber; }
static void Connect() { try { XBox.Connect(); } catch (Exception e) { MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } finally { Cache.XBoxLocator.Hide(); } }
// Use this for initialization void Start() { electric = Resources.Load <GameObject>("GameObject/particle/Electric"); playerMove = playerCharacter.GetComponent <PlayerMove>(); cablePositionDefault.transform.position = cablePosition.transform.position; ScaleChange(MIN_SCALE); gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); xBox = gameController.GetComponent <XBox>(); }
public void ShouldConectOnConsole() { var xBox = new XBox(); var remote = new JoystickBasic(xBox); xBox.Startup(); Assert.True(remote.ConectOnConsole()); }
static void Main(string[] args) { var xbox = new XBox(); xbox.Play(); var playStation = new PlayStation(); playStation.Play(); var adapter = new ControllerAdapter(); xbox.Play(adapter); }
public static void DownloadFile(FileInformation file, string workingDir, string destination, StatusChangedHandler statusChanged) { if (FindXBox() == false) { return; } string xboxFilename = Path.Combine(workingDir, file.Name); if (!XBox.FileExists(xboxFilename)) { return; } statusChanged(string.Concat("Downloading File: ", file.Name)); XBox.ReceiveFile(destination, xboxFilename); }
public static void SendFile(FileInformation file, string workingDir, StatusChangedHandler statusChanged) { if (FindXBox() == false) { return; } string filename = Path.GetFileName(file.Name); string xboxFilename = Path.Combine(workingDir, filename); if (XBox.FileExists(xboxFilename) && MessageBox.Show(filename + "\n\nWould You Like To Overwrite The Old File?", "File Already Exists.", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.No) { return; } statusChanged(string.Concat("Sending File: ", filename)); XBox.SendFile(file.Name, xboxFilename); }
public static void FindXBox(string xbox) { _xbox = new Xbox(); AsyncConnect(xbox); _xboxLocator.ShowDialog(); if (XBox.Ping()) { if (_mainWindow == null) { _mainWindow = new Main(); _mainWindow.ShowDialog(); XBox.Disconnect(); } } else { new Settings().ShowDialog(); } }
private EditChunkWindow(IconSource source, Chunk chunk, RegionFile region, ChunkEditPurpose purpose) { InitializeComponent(); WorkingChunk = chunk; ChunkRegion = region; Manager = new ChunkCoordsEditControls(chunk, region, XBox, ZBox); this.Icon = source.GetImage(IconType.Chunk).Icon; if (purpose == ChunkEditPurpose.Create) { this.Text = $"Create Chunk"; } else if (purpose == ChunkEditPurpose.Move) { this.Text = $"Move Chunk"; } XBox.Select(); }
public static void DeleteDirectory(FileInformation dir, string workingDir, StatusChangedHandler statusChanged) { if (FindXBox() == false) { return; } List <FileInformation> files = XBox.GetDirectoryList(Path.Combine(workingDir, dir.Name)); foreach (FileInformation fi in files) { statusChanged(string.Concat("Deleting: ", fi.Name)); if (fi.Attributes == FileAttributes.Directory) { DeleteDirectory(fi, Path.Combine(workingDir, dir.Name), statusChanged); } else { XBox.DeleteFile(Path.Combine(Path.Combine(workingDir, dir.Name), fi.Name)); } } XBox.DeleteDirectory(Path.Combine(workingDir, dir.Name)); }
void Start() { playerLife = PLAYER_LIFE_MAX; bullets = BULLETS_MAX; cableScript = cable.GetComponent <Cable>(); gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); pointer.enabled = false; cameraScript = cameraObject.transform.parent.GetComponent <CameraScript>(); speed = TPS_SPEED; animator = GetComponent <Animator>(); rigidbody = GetComponent <Rigidbody>(); lifeRect = Life.GetComponent <RectTransform>(); lifeRect.sizeDelta = new Vector2(1465 * playerLife, 1249); bulletRect = Bullet.GetComponent <RectTransform>(); bulletRect.sizeDelta = new Vector2(250 * bullets, 1095); lostLifeRect = LostLife.GetComponent <RectTransform>(); lostLifeRect.sizeDelta = new Vector2(1465 * (PLAYER_LIFE_MAX - playerLife), 1249); emptyBulletRect = EmptyBullet.GetComponent <RectTransform>(); emptyBulletRect.sizeDelta = new Vector2(250 * (BULLETS_MAX - bullets), 1095); xBox = gameController.GetComponent <XBox>(); }
static void StartWatchingHalo2() { XBox.SetMemory(0x1C79E5, 0x68, 0xF6, 0x79, 0x1C, 0x00, 0xC3); //Enable AI in MP XBox.SetBreakPoint(0x233194); //Breakpoint PGCR new Thread(new ThreadStart(WatchHalo2)).Start(); }
void Awake() { audioC = GetComponent <AudioController>(); bilder = GetComponent <Builder>(); //ステージの取得 stage = Resources.Load <GameObject>("StagePrefab/" + stageNumber.ToString()); //プレイヤーの取得 player = GameObject.FindGameObjectWithTag("Player"); playerScript = player.GetComponent <PlayerMove>(); foreach (Transform child in player.transform) { if (child.gameObject.tag == "Cable") { cable = child.gameObject.GetComponent <Cable>(); break; } } //ステージの生成 instansStage = Instantiate(stage); //スカイボックスをステージに合わせる RenderSettings.skybox = Resources.Load <Material>(SKYBOX_PATH + stageNumber.ToString()); foreach (Transform child in instansStage.transform) { if (child.gameObject.tag == "GimmickParent") { cable.gimmickParent = child.gameObject; } } //ビルダーにステージ情報を送る bilder.stage = instansStage; xBox = GetComponent <XBox>(); //プレイヤーの初期位置の設定 foreach (Transform child in instansStage.transform) { if (child.gameObject.tag == "StartPosition") { startPosition = child.transform.position; player.transform.position = startPosition; player.transform.eulerAngles = child.transform.eulerAngles; } } //キャンバスの取得 canvas = GameObject.FindGameObjectWithTag("Canvas"); foreach (Transform child in canvas.transform) { if (child.gameObject.name == "Pause") { //ポーズ画面の取得 pauseUi = child.gameObject.GetComponent <RawImage>(); } //ブラックアウト用の画像の取得 if (child.gameObject.name == "BlackOut") { blackBack = child.gameObject.GetComponent <Image>(); } } //ポーズ画面の取得 +1はHelp画面を入れる images = new Texture[Enum.GetValues(typeof(PouseMode)).Length + 1]; for (int i = 0; i < Enum.GetValues(typeof(PouseMode)).Length; i++) { PouseMode pm = (PouseMode)i; images[i] = Resources.Load <Texture>(POUSE_PATH + pm.ToString()); } images[images.Length - 1] = Resources.Load <Texture>("Image/Help"); //黒から透明に BlackOutAlpha(false, 1f, true, Color.black, BlackOutTime); //ステージにあったBGMの再生 AudioController.Bgm bgm = (AudioController.Bgm)Enum.Parse(typeof(AudioController.Bgm), stageNumber.ToString() + "_Bgm"); audioC.BgmSoundPlay(bgm); }