Ship!
This commit is contained in:
parent
704c82838a
commit
6a67a73c59
5 changed files with 324 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
import {canvas, context} from './index.mjs';
|
||||
import * as assets from '../assets.mjs';
|
||||
import {images as assets} from '../assets.mjs';
|
||||
import * as world from '../world/index.mjs';
|
||||
|
||||
export function render() {
|
||||
|
@ -8,5 +8,12 @@ export function render() {
|
|||
|
||||
function renderShip(ship) {
|
||||
context.fillStyle = 'red';
|
||||
context.fillRect(ship.x, ship.y, 10, 10);
|
||||
//context.fillRect(ship.x, ship.y, 10, 10);
|
||||
let size = 100;
|
||||
context.drawImage(assets.modules.capsule.small, ship.x, ship.y,
|
||||
size, size);
|
||||
context.drawImage(assets.modules.fuel.small, ship.x, ship.y + size,
|
||||
size, size);
|
||||
context.drawImage(assets.modules.thruster.light, ship.x,
|
||||
ship.y + size * 2, size, size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue