public HumidityStep(UInt16 order, stepType type, double targetHumidity, int dayRemaining, int hourRemaining, int minuteRemaining, int secondRemaining, double targetFanSpeed, stepStatus status) { this.order = order; this.type = type; this.targetHumidity = targetHumidity; timeRemaining = new TimeSpan(dayRemaining, hourRemaining, minuteRemaining, secondRemaining); this.targetFanSpeed = targetFanSpeed; this.status = status; }
void Start() { //this.gameObject.transform.position = Vector3.zero; SpawneGnerate(); StartCoroutine(TimerTick(1)); _stepType = stepType.one; music = this.GetComponent <Audio> (); //music = GetComponent<AudioSource> (); //musicVolum = .5f; }
private void compareTiles2(Tile tile_curr, Tile tile_oppo, bool autoCkeck = false) { _stepType = stepType.one; destroy = false; if (tile_curr.pos.x == tile_oppo.pos.x && tile_curr.pos.y == tile_oppo.pos.y) { tileA.setTileTexture(0); return; } else if (tile_curr.pos.x == tile_oppo.pos.x && tile_curr.pos.y != tile_oppo.pos.y) { destroy = checkPosY(tile_curr, tile_oppo); } else if (tile_curr.pos.x != tile_oppo.pos.x && tile_curr.pos.y == tile_oppo.pos.y) { destroy = checkPosX(tile_curr, tile_oppo); } if (!destroy) { _stepType = stepType.two; destroy = checkTheSecondStep(tile_curr, tile_oppo); if (!destroy) { _stepType = stepType.three; destroy = checkTheThirdStep(tile_curr, tile_oppo); } } if (destroy) { tile_curr.setTileTexture(1); tile_oppo.setTileTexture(1); drawLine.ClearPath(); } else { tileA.setTileTexture(0); drawLine.ClearPath(); return; } }
private void compareTiles(Tile tile_curr, Tile tile_oppo, bool autoCkeck = false) { _stepType = stepType.one; drawLine.waypoints.Add(tile_curr.transform); drawLine.transform.position = tile_curr.transform.position; destroy = false; //print ("Comparing"); if (tile_curr.pos.x == tile_oppo.pos.x && tile_curr.pos.y == tile_oppo.pos.y) { drawLine.ClearPath(); tileA.setTileTexture(0); //tileB.setTileTexture (0); tileA = tileB; //tileA.setTileTexture (1); tileB = null; tileA = null; return; } else if (tile_curr.pos.x == tile_oppo.pos.x && tile_curr.pos.y != tile_oppo.pos.y) { //print ("check Y"); destroy = checkPosY(tile_curr, tile_oppo); if (destroy) { drawLine.waypoints.Add(tile_oppo.transform); } } else if (tile_curr.pos.x != tile_oppo.pos.x && tile_curr.pos.y == tile_oppo.pos.y) { //print ("check X"); destroy = checkPosX(tile_curr, tile_oppo); if (destroy) { drawLine.waypoints.Add(tile_oppo.transform); } } if (!destroy) { _stepType = stepType.two; destroy = checkTheSecondStep(tile_curr, tile_oppo); //print ("Checking the second step"); if (!destroy) { _stepType = stepType.three; destroy = checkTheThirdStep(tile_curr, tile_oppo); //print ("Check the third step and destroied " + destroy); print("tile_curr.idText:" + tile_curr.idText + "tile_oppo.idText:" + tile_oppo.idText); } } if (destroy) { timeForHint = timeCount; tile_curr.transform.localScale = Vector3.zero; tile_oppo.transform.localScale = Vector3.zero; tile_curr.type = false; tile_oppo.type = false; isAutoCheck = false; music.playMatchEffect(); // _tiles.RemoveAt (tile_curr.id); // _tiles.RemoveAt (tile_oppo.id); //ClearTiles (tile_curr); //ClearTiles (_tiles[tile_oppo.id]); tileA = null; tileB = null; drawLine.MoveToWaypoint(); } else { drawLine.ClearPath(); tileA.setTileTexture(0); tileA = tileB; tileB = null; isAutoCheck = true; return; } }