private void AddConveyor(Point tile, Robot.Direction dir) { Rectangle initSource = new Rectangle(832, 192, TileSize, TileSize); switch (dir) { case Robot.Direction.Left: initSource.Y += 64; break; case Robot.Direction.Up: initSource.Y += 128; break; case Robot.Direction.Down: initSource.Y += 192; break; } var con = new Conveyer(game, batch, game.Content.Load <Texture2D>(objTexName), TileToPos(tile), initSource, 3, 1.0f / 10.0f, true, 2, dir); con.PlayAnimation(); objects.Add(con); }
private Direction OnConveyor() { Direction on = Direction.None; foreach (ADHDObject o in game.GameScreen.stage.objects) { Conveyer c = o as Conveyer; if (c != null && c.rec.Contains(new Point((int)Center.X, (int)Center.Y))) { on = c.cdir; break; } } return(on); }
private void AddConveyor(Point tile, Robot.Direction dir) { Rectangle initSource = new Rectangle(832, 192, TileSize, TileSize); switch (dir) { case Robot.Direction.Left: initSource.Y += 64; break; case Robot.Direction.Up: initSource.Y += 128; break; case Robot.Direction.Down: initSource.Y += 192; break; } var con = new Conveyer(game, batch, game.Content.Load<Texture2D>(objTexName), TileToPos(tile), initSource, 3, 1.0f / 10.0f, true, 2, dir); con.PlayAnimation(); objects.Add(con); }