public List <CameraListItem> GetDummyData() { var returnData = new List <CameraListItem>(); for (int i = 0; i < 20; i++) { //generate alert type TYPE_ACTION alertType = TYPE_ACTION.CAMERA; switch (i % 4) { case 0: alertType = TYPE_ACTION.CAMERA; break; case 1: alertType = TYPE_ACTION.MOTION; break; case 2: alertType = TYPE_ACTION.NOTIFICATION; break; case 3: alertType = TYPE_ACTION.SOUNDER; break; case 4: alertType = TYPE_ACTION.TRIPWIRE; break; } returnData.Add(new CameraListItem(alertType, null, String.Format("{0:d/M/yyyy HH:mm:ss}", DateTime.Now))); } return(returnData); }
public void SpawnPractice(TYPE_ACTION _ACTION) { indexball = GameController.instance.GetSortEff(); switch (_ACTION) { case TYPE_ACTION.NORMAL: if (body.velocity.x != 0 || body.velocity.y != 0) { Burn = false; if (tiemSpawn < 0) { if (indexball == 0) { SpawnEffect.instance.getEffect(indexball, 0, transform.position); Eff_3.Stop(); } if (indexball == 1) { SpawnEffect.instance.getEffect(indexball, 0, transform.position); Eff_3.Stop(); } if (indexball == 2) { SpawnEffect.instance.getEffect(indexball, 0, transform.position); Eff_3.Stop(); } if (indexball == 3) { SpawnEffect.instance.getEffect(indexball, 0, transform.position); Eff_4.Stop(); } if (indexball == 4) { SpawnEffect.instance.getEffect(indexball, 0, transform.position); Eff_5.Stop(); } // ParticleSystem.MainModule settings = Practice_Ball.transform.Find("Particle System").GetComponent<ParticleSystem>().main; // GetComponent<SpriteRenderer>().sprite.texture.GetPixelBilinear(40, 40); // settings.startColor = new ParticleSystem.MinMaxGradient(GetComponent<SpriteRenderer>().color); tiemSpawn = 0.15f; } else { tiemSpawn -= Time.deltaTime; } } break; case TYPE_ACTION.BURN: if (body.velocity.x != 0 || body.velocity.y != 0) { if (tiemSpawn < 0) { if (timeBurn > 0) { if (Burn) { if (indexball == 0) { SpawnEffect.instance.getEffect(indexball, 1, transform.position); Eff_3.Stop(); } if (indexball == 1) { SpawnEffect.instance.getEffect(indexball, 1, transform.position); Eff_3.Stop(); } if (indexball == 2) { SpawnEffect.instance.getEffect(indexball, 1, transform.position); if (!Eff_3.isPlaying) { Eff_3.Play(); } } if (indexball == 3) { SpawnEffect.instance.getEffect(indexball, 1, transform.position); if (!Eff_4.isPlaying) { Eff_4.Play(); } } if (indexball == 4) { SpawnEffect.instance.getEffect(indexball, 1, transform.position); if (!Eff_5.isPlaying) { Eff_5.Play(); } } } else { // SpawnEffect.instance.Set_System(Paractice_Type.SMOKE_LEVEL_3, new Vector3(transform.position.x, transform.position.y, 5), "",transform); if (indexball == 0) { SpawnEffect.instance.getEffect(indexball, 2, transform.position); Eff_3.Stop(); } if (indexball == 1) { SpawnEffect.instance.getEffect(indexball, 2, transform.position); Eff_3.Stop(); } if (indexball == 2) { SpawnEffect.instance.getEffect(indexball, 2, transform.position); Eff_3.Stop(); } if (indexball == 3) { SpawnEffect.instance.getEffect(indexball, 2, transform.position); Eff_4.Stop(); } if (indexball == 4) { SpawnEffect.instance.getEffect(indexball, 2, transform.position); Eff_5.Stop(); } } } else { timeBurn -= Time.deltaTime; } tiemSpawn = 0; } else { tiemSpawn -= Time.deltaTime; } } break; } }
public CameraListItem(TYPE_ACTION type = TYPE_ACTION.TRIPWIRE, byte[] imgData = null, string time = "") { this.type = type; this.imgData = imgData; this.time = time; }