Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikaoto committed Apr 3, 2018
1 parent 1d1e88e commit b2283df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Place `deep.lua` inside your project and require it:
deep = require "deep"
```

### Queue actions
## Queue actions
```lua
deep.queue(3, print, "wound!")
deep.queue(1, print, "It's just")
deep.queue(2, print, "a flesh")
```

### Execute
## Execute
```lua
deep.execute()
```
Expand All @@ -31,7 +31,7 @@ wound!

# Documentation

## `deep.queue(i, fun, ...)`
### `deep.queue(i, fun, ...)`
Queues a function for execution at index `i`

```lua
Expand All @@ -43,7 +43,7 @@ Arguments:
* `fun` `(function)` - An anonymous or named function
* `...` `(*)` - The arguments of the passed named function

### There are two ways to queue actions:
#### There are two ways to queue actions:
* Using anonymous functions:
```lua
deep.queue(400, function() hit(iron, 100) end)
Expand All @@ -54,7 +54,7 @@ deep.queue(400, function() hit(iron, 100) end)
deep.queue(400, hit, iron, 100)
```

### Queuing multiple actions
#### Queuing multiple actions
Simply use an anonymous function:
```lua
deep.queue(1, function()
Expand All @@ -64,7 +64,7 @@ end)
```
---

## `deep:execute()`
### `deep:execute()`
Executes all of the queued actions.

```lua
Expand Down

0 comments on commit b2283df

Please sign in to comment.