// Add new camera to the collection and run it public bool Add(CameraPlay camwin, DeviceInfo deviceInfo, CameraInfo camera) { // create video source IVideoSource videoSource = DeviceBusiness.Instance.CreateVideoSource(deviceInfo.ProviderName); if (videoSource == null) { return(false); } DeviceDriver device = new DeviceDriver(videoSource); if (!RunningDeviceList.ContainsKey(deviceInfo.DeviceId)) { deviceInfo.ServiceID = -1; device.Init(ref deviceInfo); RunningDeviceList.Add(deviceInfo.DeviceId, deviceInfo); RunningDriverList.Add(camera.CameraId, device); } else { deviceInfo = RunningDeviceList[deviceInfo.DeviceId]; device.Init(ref deviceInfo); RunningDriverList.Add(camera.CameraId, device); } device.Start(ref camera); camwin.Camera = device; return(true); }
private void cameraPlay_DoubleClickVideo(object sender, EventArgs e) { try { if (!isFullScreen) { SingleCameraMode = true; FitToWindow = true; currentWin = lastClicked; } else { SingleCameraMode = false; currentWin.ClickMe = true; } doubleClicked = (CameraPlay)sender; if (DoubleCamera != null) { DoubleCamera(!isFullScreen, currentWin.Camera.CurrentCamera); } isFullScreen = !isFullScreen; UpdateSize(); } catch (Exception ex) { } }
public override IEnumerator Behavior() { CameraPlay.EarthQuakeShake(shakeTime, shakeSpeed, shakeSize); if (wait) { yield return(new WaitForSeconds(shakeTime)); } }
public override IEnumerator Behavior() { CameraPlay.Glitch(glitchTime); if (wait) { yield return(new WaitForSeconds(glitchTime)); } }
public override IEnumerator Behavior() { Vector3 s = GetPosInViewPort(); CameraPlay.Radial(s.x, s.y, radialTime, radialSize); if (wait) { yield return(new WaitForSeconds(radialTime)); } }
public override IEnumerator Behavior() { Vector3 s = GetPosInViewPort(); CameraPlay.Shockwave(s.x, s.y, shockWaveTime, shockWaveSize); if (wait) { yield return(new WaitForSeconds(shockWaveTime)); } }
public override IEnumerator Behavior() { Vector3 s = GetPosInViewPort(); CameraPlay.FishEye(s.x, s.y, fishEyeTime); if (wait) { yield return(new WaitForSeconds(fishEyeTime)); } }
public override IEnumerator Behavior() { Vector3 s = GetPosInViewPort(); CameraPlay.Pitch(s.x, s.y, pitchTime, pitchSize); if (wait) { yield return(new WaitForSeconds(pitchTime)); } }
public CameraPlay GetCamera(int row, int col) { CameraPlay rtncameraPlay = null; if ((row >= 0) && (col >= 0) && (row < MaxRows) && (col < MaxCols)) { rtncameraPlay = camWindows[row, col]; } return(rtncameraPlay); }
public override IEnumerator Behavior() { float dur = 0.5f; CameraPlay.Shockwave(dur, 0.5f, 0.250f); CameraPlay.Glitch(dur); CameraPlay.EarthQuakeShake(0.3f); if (!wait) { yield break; } yield return(new WaitForSeconds(dur)); }
public override void OnEnter() { if (!customize.Value) { CameraPlay.BulletHole(); } else { CameraPlay.BulletHole(floatX.Value, floatY.Value, time.Value, size.Value); } Finish(); }
public override void OnEnter() { if (!customize.Value) { CameraPlay.BloodHit(); } else { CameraPlay.BloodHit(color.Value, time.Value, distance.Value); } Finish(); }
/// <summary> /// 关闭摄像机特效 /// </summary> public void Off_Filter() { CameraPlay.NightVision_OFF(0.5f); CameraPlay.Drunk_OFF(0.5f); CameraPlay.SniperScope_OFF(); CameraPlay.BlackWhite_OFF(); CameraPlay.FlyVision_OFF(); CameraPlay.Fade_OFF(); CameraPlay.Pixel_OFF(); CameraPlay.Colored_OFF(); CameraPlay.Thermavision_OFF(); CameraPlay.Infrared_OFF(); CameraPlay.WidescreenH_OFF(); CameraPlay.RainDrop_OFF(); CameraPlay.Inverse_OFF(); }
IEnumerator SubGameClear() { yield return(new WaitForSeconds(1f)); // SE音 SoundManager.Play(SoundManager.SEClip.clear); // カメラ振動エフェクト CameraPlay.EarthQuakeShake(2f); yield return(new WaitForSeconds(2f)); SoundManager.Play(SoundManager.SEClip.bomb); // 爆発エフェクト Instantiate(explosionPrefab, goalGate.transform.position + Vector3.right * 3, explosionPrefab.transform.rotation); yield return(new WaitForSeconds(2.5f)); // 崩壊させる GameObject blockGrid = GameObject.Find("Grid/BlockTilemap2"); blockGrid.GetComponent <Rigidbody2D>().bodyType = RigidbodyType2D.Dynamic; yield return(new WaitForSeconds(1f)); // 切断 networkManager.PhotonDisConnect(); yield return(new WaitForSeconds(1f)); // Glitchエフェクト CameraPlay.Glitch2(2f); yield return(new WaitForSeconds(2f)); // カメラノイズエフェクト CameraPlay.Noise(2f); yield return(new WaitForSeconds(2f)); // クリアシーンを表示 // FadeManager.Instance.LoadScene("ClearScene", 1f); SceneManager.LoadScene("ClearScene"); }
public void RPCSpikeOnOFf(bool isActive) { bool active_ = spike.activeInHierarchy; if (active_ == isActive) { return; } // SE音 SoundManager.Play(SoundManager.SEClip.pibo); // カメラ振動エフェクト CameraPlay.EarthQuakeShake(1f); spike.SetActive(isActive); }
// ----- void Awake() { // プレイヤー人数 x 10の体力とする。 bossHp = PhotonNetwork.CountOfPlayers * 10; // (無いと思うが念の為) if (bossHp == 0) { bossHp = 10; } simpleAnimation = GetComponent <SimpleAnimation>(); // ボス生成のフラグを立てる PlayData.bossSpawned = true; // カメラ振動エフェクト CameraPlay.EarthQuakeShake(2f); }
private void SetClickON(CameraPlay cameraPlay) { string winName = "cameraPlay"; for (int i = 0; i < 25; i++) { Control[] control = this.Controls.Find(string.Format("{0}{1}", winName, i), false); if (control != null && control.Length > 0) { CameraPlay ctr = (CameraPlay)control[0]; if (ctr != null) { ctr.ClickMe = false; } } } cameraPlay.ClickMe = true; }
public void RpcBossDamage() { bossHp--; if (bossHp <= 0) { // ★ エフェクトとSE // カメラ振動エフェクト CameraPlay.EarthQuakeShake(2f); // SE SoundManager.Play(SoundManager.SEClip.bossDeath); PlayData.bossDied = true; // PhotonNetwork.Destroy(this.gameObject); // Ownerからしか削除できないので、とりあえず普通で Destroy(gameObject); } }
async void Death() { this.GetComponent <SimpleAnimation>().Play("DEATH"); SEManager.Instance.Play(SEPath.DEATH); foreach (Rigidbody2D obj in UnityEngine.Resources.FindObjectsOfTypeAll(typeof(Rigidbody2D))) { obj.velocity = Vector3.zero; obj.constraints = RigidbodyConstraints2D.FreezeRotation; } CameraPlay.EarthQuakeShake(0.3f, 30, 2); deathAnime0.transform.localScale = new Vector3(10, 6000, 1); deathAnime1.transform.localScale = new Vector3(6000, 10, 1); deathAnime0.transform.DOScale(new Vector3(0, 6000, 1), 0.25f).SetDelay(0.3f); deathAnime1.transform.DOScale(new Vector3(6000, 0, 1), 0.25f).SetDelay(0.3f); await UniTask.Delay(1000); sceneTransistor.TransistionScene(EnumSceneName.Result, scoreModel.score, default); }
public override void OnEnter() { if (glitchVersion.Value == 1) { CameraPlay.Glitch(effectLength.Value); } if (glitchVersion.Value == 2) { CameraPlay.Glitch2(effectLength.Value); } else { CameraPlay.Glitch3(effectLength.Value); } Finish(); }
/// <summary> /// 葛丽池3效果 /// </summary> /// <param name="Time"></param> public void Glitch3(float Time) { CameraPlay.Glitch3(Time); }
/// <summary> /// 见血效果 /// </summary> /// <param name="Time">Set the time effect in second</param> /// <param name="dist">Set the distorsion (1.0 = normal)</param> public void BloodHit(float Time, float dist) { CameraPlay.BloodHit(Time, dist); }
/// <summary> /// 子弹效果 /// </summary> /// <param name="sx">The sx screen position of the effect. 0 = left side of the screen. 1 = Right side of the screen. 0.5f = center of the screen</param> /// <param name="sy">The sy position of the effect. 0 = up side of the screen. 1 = down side of the screen. 0.5f = center of the screen</param> /// <param name="Time">Set the apparition time in sec</param> /// <param name="dist">Set the distorsion (1.0 = normal)</param> public void BulletHole(Vector3 pos, float Time, float dist) { CameraPlay.BulletHole(CameraPlay.PosScreenX(pos), CameraPlay.PosScreenY(pos), Time, dist); }
/// <summary> /// 捏动效果 /// </summary> /// <param name="x">The x position of the effect. 0 = left side of the screen. 1 = Right side of the screen. 0.5f = center of the screen</param> /// <param name="y">The y position of the effect. 0 = up side of the screen. 1 = down side of the screen. 0.5f = center of the screen</param> /// <param name="time">Time duration of the effect animation in second.</param> /// <param name="size">Size of the Distortion FX</param> public void Pinch(Vector3 pos, float time, float size) { CameraPlay.Pinch(CameraPlay.PosScreenX(pos), CameraPlay.PosScreenY(pos), time, size); }
/// <summary> /// 下雨效果 /// </summary> /// <param name="Time">Set the time effect in second.</param> public void RainDrop_ON(float Time) { CameraPlay.RainDrop_ON(Time); }
/// <summary> /// 关闭反色 /// </summary> /// <param name="time">Set the apparition time in sec</param> public void Inverse_OFF() { CameraPlay.Inverse_OFF(); }
/// <summary> /// 反色 /// </summary> /// <param name="time">Set the apparition time in sec</param> public void Inverse_ON(float time) { CameraPlay.Inverse_ON(time); }
/// <summary> /// 淡出效果 /// </summary> /// <param name="color">Set the color of the fading effect</param> /// <param name="Time">Set the time effect in second</param> public void FadeInOut(Color color, float time) { CameraPlay.FadeInOut(color, time); }
/// <summary> /// 震动波效果 /// </summary> /// <param name="x">The x position of the effect. 0 = left side of the screen. 1 = Right side of the screen. 0.5f = center of the screen</param> /// <param name="y">The y position of the effect. 0 = up side of the screen. 1 = down side of the screen. 0.5f = center of the screen</param> /// <param name="time">Time duration of the effect animation in second.</param> /// <param name="size">Size of the Distortion FX</param> public void Shockwave(Vector3 pos, float time, float size) { CameraPlay.Shockwave(CameraPlay.PosScreenX(pos), CameraPlay.PosScreenY(pos), time, size); }
/// <summary> /// 关闭下雨效果 /// </summary> /// <param name="Time">Set the time effect in second.</param> public void RainDrop_OFF() { CameraPlay.RainDrop_OFF(); }