mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
36 lines
783 B
JavaScript
36 lines
783 B
JavaScript
import { DrawParameters } from "../core/draw_parameters";
|
|
import { BasicSerializableObject, types } from "../savegame/serialization";
|
|
import { THEME } from "./theme";
|
|
|
|
/**
|
|
* Class for items on belts etc. Not an entity for performance reasons
|
|
*/
|
|
export class BaseItem extends BasicSerializableObject {
|
|
constructor() {
|
|
super();
|
|
}
|
|
|
|
static getId() {
|
|
return "base_item";
|
|
}
|
|
|
|
/** @returns {object} */
|
|
static getSchema() {
|
|
return {};
|
|
}
|
|
|
|
/**
|
|
* Draws the item at the given position
|
|
* @param {number} x
|
|
* @param {number} y
|
|
* @param {DrawParameters} parameters
|
|
* @param {number=} size
|
|
*/
|
|
draw(x, y, parameters, size) {}
|
|
|
|
getBackgroundColorAsResource() {
|
|
abstract;
|
|
return "";
|
|
}
|
|
}
|