2016-12-26 10:58:27 +00:00
|
|
|
"use strict";
|
|
|
|
|
2016-12-26 17:31:32 +00:00
|
|
|
import Vector from './Vector';
|
|
|
|
|
2016-12-26 10:58:27 +00:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
2016-12-26 17:31:32 +00:00
|
|
|
|
|
|
|
export default Star;
|