Skip to content

Commit

Permalink
Merge pull request #2 from AldeRoberge/patch-1
Browse files Browse the repository at this point in the history
Added missing () in entity.md
  • Loading branch information
genaray authored Nov 4, 2024
2 parents 6951a22 + 1db77a5 commit e537d88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions documentation/entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ So you don't stop at changing lives, do you? Entities can be changed in a variet
var dwarf = world.Create(new Dwarf("Gimli"), new Position(0,0), new Velocity());

// Telepor the dwarf
ref var position = ref <a data-footnote-ref href="#user-content-fn-1">dwarf.Get&#x3C;Position>;</a>
ref var position = ref <a data-footnote-ref href="#user-content-fn-1">dwarf.Get&#x3C;Position>();</a>
position.X++;
position.Y++;

// Force him to move on its own
dwarf.Set(new Velocity(1,1));

// Give the dwarf a pickaxe and make him sad by taking it away
if(!dwarf.Has&#x3C;Pickaxe>) <a data-footnote-ref href="#user-content-fn-2">dwarf.Add(new Pickaxe());</a>
if(!dwarf.Has&#x3C;Pickaxe>()) <a data-footnote-ref href="#user-content-fn-2">dwarf.Add(new Pickaxe());</a>
dwarf.Remove&#x3C;Pickaxe>();
</code></pre>

Expand Down

0 comments on commit e537d88

Please sign in to comment.