encompass-cs-docs/content/pong/draw_paddle/_index.md

16 lines
614 B
Markdown
Raw Normal View History

2019-05-23 19:54:38 +00:00
---
2019-05-23 21:27:13 +00:00
title: "Drawing a Paddle"
2019-05-23 19:54:38 +00:00
date: 2019-05-23T11:02:45-07:00
2019-05-23 21:27:13 +00:00
weight: 10
2019-05-23 19:54:38 +00:00
---
It's nice to see something on screen right away when we start making a game, so let's make that happen.
In a 2D game, Encompass needs to know which order that things should draw in.
Encompass draws things back to front using integer layers. A negative value means farther in the back. A positive value means farther in the front. So an object on layer 10 will draw on top of an object on layer -10.
We'll need two things to get a paddle drawing on screen: A *DrawComponent* and an *OrderedRenderer*.
2019-05-23 19:54:38 +00:00
Let's start with the Component.