Entity
✓ Published0🌍 Public
NNaoray
Last edited Oct 5, 2017
Created on Oct 5, 2017
This example demonstrates a basic 2D game entity that moves and draws a texture. The `Entity` class holds a position and velocity, updating its location each frame based on elapsed time via `Update(GameTime)`. It renders itself in `Draw(SpriteBatch)` using a MonoGame/XNA `SpriteBatch` call. A read-only `HitBox` property computes a rectangle from the current position and texture dimensions. Code uses the `Texture2D` class for the sprite and `Vector2` for movement, with no external data source.
AI-generated description