Scene-Starlight/Star.js

35 lines
461 B
JavaScript
Raw Normal View History

"use strict";
import Vector from './Vector';
class Star
{
constructor(inCanvas, inPosition, inSize)
{
this.canvas = inCanvas;
this.position = inPosition;
this.size = inSize;
this.colour = "white";
}
update(dt)
{
}
render(context)
{
context.save();
context.translate(this.position.x, this.position.y);
context.fillStyle = this.colour;
context.fillRect(-5, -5, 10, 10);
context.restore();
}
}
export default Star;